ofsc-utility 1.0.54 → 1.0.56

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/CHANGELOG.md CHANGED
@@ -6,7 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ### Changed
10
+ - Refactor logging to use colored output and update version
11
+
9
12
  ### Maintenance
13
+ - Bump version to 1.0.54 and update API calls to use fetchPostWithRetry
10
14
  - version 1.0.46
11
15
 
12
16
  ### Added
@@ -10,7 +10,7 @@ async function startActivity(clientId, clientSecret, instanceUrl, activityId, to
10
10
  throw new Error("Invalid activityId. It must be a valid number.");
11
11
  }
12
12
  const url = `https://${instanceUrl}.fs.ocs.oraclecloud.com/rest/ofscCore/v1/activities/${Number(activityId)}/custom-actions/start`;
13
- console.log(`➡️ Fetching activity by ID: ${url}`);
13
+ utilities_1.log.blue(`Starting activity by ID: ${url}`);
14
14
  const response = await (0, utilities_1.fetchPostWithRetry)(url, clientId, clientSecret, instanceUrl, token, {});
15
15
  return response;
16
16
  }
@@ -19,7 +19,7 @@ async function cancelActivity(clientId, clientSecret, instanceUrl, activityId, t
19
19
  throw new Error("Invalid activityId. It must be a valid number.");
20
20
  }
21
21
  const url = `https://${instanceUrl}.fs.ocs.oraclecloud.com/rest/ofscCore/v1/activities/${Number(activityId)}/custom-actions/cancel`;
22
- console.log(`➡️ Fetching activity by ID: ${url}`);
22
+ utilities_1.log.red(`Cancelling activity by ID: ${url}`);
23
23
  const response = await (0, utilities_1.fetchPostWithRetry)(url, clientId, clientSecret, instanceUrl, token, {});
24
24
  return response;
25
25
  }
@@ -28,7 +28,7 @@ async function completeActivity(clientId, clientSecret, instanceUrl, activityId,
28
28
  throw new Error("Invalid activityId. It must be a valid number.");
29
29
  }
30
30
  const url = `https://${instanceUrl}.fs.ocs.oraclecloud.com/rest/ofscCore/v1/activities/${Number(activityId)}/custom-actions/complete`;
31
- console.log(`Completing activity by ID: ${url}`);
31
+ utilities_1.log.green(`Completing activity by ID: ${url}`);
32
32
  const response = await (0, utilities_1.fetchPostWithRetry)(url, clientId, clientSecret, instanceUrl, token, {});
33
33
  return response;
34
34
  }
@@ -37,7 +37,7 @@ async function deleteActivity(clientId, clientSecret, instanceUrl, activityId, t
37
37
  throw new Error("Invalid activityId. It must be a valid number.");
38
38
  }
39
39
  const url = `https://${instanceUrl}.fs.ocs.oraclecloud.com/rest/ofscCore/v1/activities/${Number(activityId)}`;
40
- console.log(`Deleting activity by ID: ${url}`);
40
+ utilities_1.log.yellow(`Deleting activity by ID: ${url}`);
41
41
  const response = await (0, utilities_1.deleteWithRetry)(url, clientId, clientSecret, instanceUrl, token);
42
42
  return response;
43
43
  }
@@ -19,3 +19,4 @@ export declare function getActivitybyId(clientId: string, clientSecret: string,
19
19
  data: any;
20
20
  }>;
21
21
  export declare function getAllNonScheduledActivities(clientId: string, clientSecret: string, instanceUrl: string, rootBucket: string, fields?: string): Promise<any[]>;
22
+ export declare function getAllScheduledActivities(clientId: string, clientSecret: string, instanceUrl: string, rootBucket: string): Promise<any[]>;
@@ -4,6 +4,7 @@ exports.deleteActivity = exports.completeActivity = exports.cancelActivity = exp
4
4
  exports.getAllActivities = getAllActivities;
5
5
  exports.getActivitybyId = getActivitybyId;
6
6
  exports.getAllNonScheduledActivities = getAllNonScheduledActivities;
7
+ exports.getAllScheduledActivities = getAllScheduledActivities;
7
8
  const oauthTokenService_1 = require("../oauthTokenService");
8
9
  const utilities_1 = require("../utilities");
9
10
  var activityActions_1 = require("./activityActions");
@@ -56,16 +57,16 @@ async function getAllActivities(clientId, clientSecret, instanceUrl, resources,
56
57
  if (includeNonScheduled)
57
58
  params.append("includeNonScheduled", "true");
58
59
  const url = `https://${instanceUrl}.fs.ocs.oraclecloud.com/rest/ofscCore/v1/activities/?${params.toString()}`;
59
- console.error(url);
60
- console.log(`➡️ Fetching offset=${offset}, limit=${limit}`);
60
+ utilities_1.log.red(url);
61
+ utilities_1.log.brightBlue(`➡️ Fetching offset=${offset}, limit=${limit}`);
61
62
  const response = await (0, utilities_1.fetchWithRetry)(url, clientId, clientSecret, instanceUrl, token);
62
63
  const data = response.data;
63
64
  if (!data.items || data.items.length === 0) {
64
- console.log("✔ No more items found. Stopping pagination.");
65
+ utilities_1.log.yellow("✔ No more items found. Stopping pagination.");
65
66
  break;
66
67
  }
67
68
  allItems.push(...data.items);
68
- console.log(` ✔ Received ${data.items.length} items (Total: ${allItems.length})`);
69
+ utilities_1.log.yellow(` ✔ Received ${data.items.length} items (Total: ${allItems.length})`);
69
70
  limit = data.limit;
70
71
  offset += limit;
71
72
  }
@@ -73,7 +74,7 @@ async function getAllActivities(clientId, clientSecret, instanceUrl, resources,
73
74
  }
74
75
  async function getActivitybyId(clientId, clientSecret, instanceUrl, activityId, token = "") {
75
76
  const url = `https://${instanceUrl}.fs.ocs.oraclecloud.com/rest/ofscCore/v1/activities/${Number(activityId)}/`;
76
- console.log(`➡️ Fetching activity by ID: ${url}`);
77
+ utilities_1.log.brightBlue(`➡️ Fetching activity by ID: ${url}`);
77
78
  const response = await (0, utilities_1.fetchWithRetry)(url, clientId, clientSecret, instanceUrl, token);
78
79
  return response;
79
80
  }
@@ -98,18 +99,76 @@ async function getAllNonScheduledActivities(clientId, clientSecret, instanceUrl,
98
99
  params.append("fields", fields);
99
100
  params.append("includeNonScheduled", "true");
100
101
  const url = `https://${instanceUrl}.fs.ocs.oraclecloud.com/rest/ofscCore/v1/activities/?${params.toString()}`;
101
- console.error(url);
102
- console.log(` Fetching Non Scheduled Activities: offset=${offset}, limit=${limit}`);
102
+ utilities_1.log.red(url);
103
+ utilities_1.log.yellow(` Fetching Non Scheduled Activities: offset=${offset}, limit=${limit}`);
103
104
  const response = await (0, utilities_1.fetchWithRetry)(url, clientId, clientSecret, instanceUrl, token);
104
105
  const data = response.data;
105
106
  if (!data.items || data.items.length === 0 || data.hasMore === false) {
106
- console.log("No more items found. Stopping pagination.");
107
+ utilities_1.log.yellow("No more items found. Stopping pagination.");
107
108
  break;
108
109
  }
109
110
  allItems.push(...data.items);
110
- console.log(`Received ${data.items.length} items (Total: ${allItems.length})`);
111
+ utilities_1.log.yellow(`Received ${data.items.length} items (Total: ${allItems.length})`);
111
112
  limit = data.limit;
112
113
  offset += limit;
113
114
  }
114
115
  return allItems;
115
116
  }
117
+ async function getAllScheduledActivities(clientId, clientSecret, instanceUrl, rootBucket) {
118
+ const limit = 1000;
119
+ const allItems = [];
120
+ const token = await (0, oauthTokenService_1.getOAuthToken)(clientId, clientSecret, instanceUrl);
121
+ // Start from today
122
+ let dateTo = new Date();
123
+ // Date range loop
124
+ dateRangeLoop: while (true) {
125
+ const dateFrom = new Date(dateTo);
126
+ dateFrom.setDate(dateFrom.getDate() - 31);
127
+ const dateFromStr = formatDate(dateFrom);
128
+ const dateToStr = formatDate(dateTo);
129
+ utilities_1.log.brightBlue(`\nDate Range: ${dateFromStr} → ${dateToStr}`);
130
+ let offset = 0;
131
+ while (true) {
132
+ const params = new URLSearchParams({
133
+ offset: offset.toString(),
134
+ limit: limit.toString(),
135
+ dateFrom: dateFromStr,
136
+ dateTo: dateToStr,
137
+ includeNonScheduled: "false",
138
+ });
139
+ if (rootBucket) {
140
+ params.append("resources", rootBucket);
141
+ }
142
+ const url = `https://${instanceUrl}.fs.ocs.oraclecloud.com/rest/ofscCore/v1/activities/?${params.toString()}`;
143
+ utilities_1.log.yellow(`API: dateFrom=${dateFromStr}, dateTo=${dateToStr}, offset=${offset}`);
144
+ const response = await (0, utilities_1.fetchWithRetry)(url, clientId, clientSecret, instanceUrl, token);
145
+ const data = response.data;
146
+ if (!data.items || data.items.length === 0) {
147
+ utilities_1.log.green("✔ No items found. Stopping all processing.");
148
+ break dateRangeLoop;
149
+ }
150
+ // Add items
151
+ allItems.push(...data.items);
152
+ utilities_1.log.yellow(`✔ Received ${data.items.length} items`);
153
+ utilities_1.log.yellow(`✔ Total items: ${allItems.length}`);
154
+ utilities_1.log.yellow(`✔ hasMore: ${data.hasMore}`);
155
+ if (data.hasMore === true) {
156
+ // More pages available for SAME date range
157
+ offset += data.items.length;
158
+ utilities_1.log.yellow(`➡️ More data available. Next offset=${offset}`);
159
+ continue;
160
+ }
161
+ utilities_1.log.yellow(`✔ Date range completed: ${dateFromStr} → ${dateToStr}`);
162
+ break;
163
+ }
164
+ dateTo = new Date(dateFrom);
165
+ utilities_1.log.yellow(`⬅️ Moving to previous date range. New dateTo=${formatDate(dateTo)}`);
166
+ }
167
+ return allItems;
168
+ }
169
+ /**
170
+ * Format Date as YYYY-MM-DD
171
+ */
172
+ function formatDate(date) {
173
+ return date.toISOString().split("T")[0];
174
+ }
package/dist/index.d.ts CHANGED
@@ -16,7 +16,7 @@ export { downloadWorkZoneCSV } from './workZones';
16
16
  export { AllResources, downloadAllResourcesCSV, getResourcebyId, getworkSkillsOfResource, updateResourcebyId } from './resources';
17
17
  export { downloadAllInactiveUsers, downloadAllInactiveUsersCSV, downloadAllUsersCSV, generateUsersCollaborationCSV, getUserByLogin, updateUserbyLogin } from './users';
18
18
  export { downloadAllInventoryTypesCSV, getInventoryTypesDetail, updateCreateInventoryType } from './inventoryTypes';
19
- export { getActivitybyId, getAllActivities, startActivity, cancelActivity, completeActivity, deleteActivity, getAllNonScheduledActivities } from './activities';
19
+ export { getActivitybyId, getAllActivities, getAllScheduledActivities, startActivity, cancelActivity, completeActivity, deleteActivity, getAllNonScheduledActivities } from './activities';
20
20
  export { createActivityCustomerInventories, getActivityCustomerInventories } from './activityInventories';
21
21
  export { downloadAllEventsOfDay, downloadAllEventsOfDayCSV, downloadAllEventsOfDLastTwoMinutes, downloadAllEventsOfLastOneHour } from './events';
22
22
  export { createExcelFile } from './utilities';
@@ -31,6 +31,7 @@ declare const OfscUtility: {
31
31
  updateInventoryType: any;
32
32
  Activity: {
33
33
  getAllActivities: any;
34
+ getAllScheduledActivities: any;
34
35
  getAllNonScheduledActivities: any;
35
36
  getActivitybyId: any;
36
37
  startActivity: any;
package/dist/index.js CHANGED
@@ -36,7 +36,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.createConfigurationFile = exports.createExcelFile = exports.downloadAllEventsOfLastOneHour = exports.downloadAllEventsOfDLastTwoMinutes = exports.downloadAllEventsOfDayCSV = exports.downloadAllEventsOfDay = exports.getActivityCustomerInventories = exports.createActivityCustomerInventories = exports.getAllNonScheduledActivities = exports.deleteActivity = exports.completeActivity = exports.cancelActivity = exports.startActivity = exports.getAllActivities = exports.getActivitybyId = exports.updateCreateInventoryType = exports.getInventoryTypesDetail = exports.downloadAllInventoryTypesCSV = exports.updateUserbyLogin = exports.getUserByLogin = exports.generateUsersCollaborationCSV = exports.downloadAllUsersCSV = exports.downloadAllInactiveUsersCSV = exports.downloadAllInactiveUsers = exports.updateResourcebyId = exports.getworkSkillsOfResource = exports.getResourcebyId = exports.downloadAllResourcesCSV = exports.AllResources = exports.downloadWorkZoneCSV = exports.getOAuthToken = exports.generateAllOnHandInventoryOfAllResourcesCSV = exports.generateAllOnHandInventoryOfAllResources = exports.WorkZone = exports.Utilities = exports.User = exports.Resource = exports.OauthTokenService = exports.CreateConfigurationFile = exports.InventoryType = exports.Inventory = exports.Events = exports.ActivityInventories = exports.Activity = void 0;
39
+ exports.createConfigurationFile = exports.createExcelFile = exports.downloadAllEventsOfLastOneHour = exports.downloadAllEventsOfDLastTwoMinutes = exports.downloadAllEventsOfDayCSV = exports.downloadAllEventsOfDay = exports.getActivityCustomerInventories = exports.createActivityCustomerInventories = exports.getAllNonScheduledActivities = exports.deleteActivity = exports.completeActivity = exports.cancelActivity = exports.startActivity = exports.getAllScheduledActivities = exports.getAllActivities = exports.getActivitybyId = exports.updateCreateInventoryType = exports.getInventoryTypesDetail = exports.downloadAllInventoryTypesCSV = exports.updateUserbyLogin = exports.getUserByLogin = exports.generateUsersCollaborationCSV = exports.downloadAllUsersCSV = exports.downloadAllInactiveUsersCSV = exports.downloadAllInactiveUsers = exports.updateResourcebyId = exports.getworkSkillsOfResource = exports.getResourcebyId = exports.downloadAllResourcesCSV = exports.AllResources = exports.downloadWorkZoneCSV = exports.getOAuthToken = exports.generateAllOnHandInventoryOfAllResourcesCSV = exports.generateAllOnHandInventoryOfAllResources = exports.WorkZone = exports.Utilities = exports.User = exports.Resource = exports.OauthTokenService = exports.CreateConfigurationFile = exports.InventoryType = exports.Inventory = exports.Events = exports.ActivityInventories = exports.Activity = void 0;
40
40
  // Export all methods grouped by category
41
41
  exports.Activity = __importStar(require("./activities"));
42
42
  exports.ActivityInventories = __importStar(require("./activityInventories"));
@@ -78,6 +78,7 @@ Object.defineProperty(exports, "updateCreateInventoryType", { enumerable: true,
78
78
  var activities_1 = require("./activities");
79
79
  Object.defineProperty(exports, "getActivitybyId", { enumerable: true, get: function () { return activities_1.getActivitybyId; } });
80
80
  Object.defineProperty(exports, "getAllActivities", { enumerable: true, get: function () { return activities_1.getAllActivities; } });
81
+ Object.defineProperty(exports, "getAllScheduledActivities", { enumerable: true, get: function () { return activities_1.getAllScheduledActivities; } });
81
82
  Object.defineProperty(exports, "startActivity", { enumerable: true, get: function () { return activities_1.startActivity; } });
82
83
  Object.defineProperty(exports, "cancelActivity", { enumerable: true, get: function () { return activities_1.cancelActivity; } });
83
84
  Object.defineProperty(exports, "completeActivity", { enumerable: true, get: function () { return activities_1.completeActivity; } });
@@ -106,6 +107,7 @@ const OfscUtility = {
106
107
  updateInventoryType: require('./inventoryTypes').updateInventoryType,
107
108
  Activity: {
108
109
  getAllActivities: require('./activities').getAllActivities,
110
+ getAllScheduledActivities: require('./activities').getAllScheduledActivities,
109
111
  getAllNonScheduledActivities: require('./activities').getAllNonScheduledActivities,
110
112
  getActivitybyId: require('./activities').getActivitybyId,
111
113
  startActivity: require('./activities').startActivity,
@@ -47,4 +47,22 @@ export declare function getTimeBefore3600SecondsAlt(): string;
47
47
  * Falls back to null if the value is missing/unparseable.
48
48
  */
49
49
  export declare function parseOFSCDate(value: unknown): Date | null;
50
+ export declare const log: {
51
+ black: (message: string) => void;
52
+ red: (message: string) => void;
53
+ green: (message: string) => void;
54
+ yellow: (message: string) => void;
55
+ blue: (message: string) => void;
56
+ magenta: (message: string) => void;
57
+ cyan: (message: string) => void;
58
+ white: (message: string) => void;
59
+ gray: (message: string) => void;
60
+ brightRed: (message: string) => void;
61
+ brightGreen: (message: string) => void;
62
+ brightYellow: (message: string) => void;
63
+ brightBlue: (message: string) => void;
64
+ brightMagenta: (message: string) => void;
65
+ brightCyan: (message: string) => void;
66
+ brightWhite: (message: string) => void;
67
+ };
50
68
  export {};
@@ -36,7 +36,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
36
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.fetchPostWithRetry = exports.fetchPatchWithRetry = exports.deleteWithRetry = exports.fetchWithRetry = void 0;
39
+ exports.log = exports.fetchPostWithRetry = exports.fetchPatchWithRetry = exports.deleteWithRetry = exports.fetchWithRetry = void 0;
40
40
  exports.saveCsv = saveCsv;
41
41
  exports.xmlNodeToObjects = xmlNodeToObjects;
42
42
  exports.createExcelFile = createExcelFile;
@@ -559,3 +559,43 @@ function parseOFSCDate(value) {
559
559
  const d = new Date(isoLike);
560
560
  return isNaN(d.getTime()) ? null : d;
561
561
  }
562
+ const COLORS = {
563
+ reset: "\x1b[0m",
564
+ black: "\x1b[30m",
565
+ red: "\x1b[31m",
566
+ green: "\x1b[32m",
567
+ yellow: "\x1b[33m",
568
+ blue: "\x1b[34m",
569
+ magenta: "\x1b[35m",
570
+ cyan: "\x1b[36m",
571
+ white: "\x1b[37m",
572
+ gray: "\x1b[90m",
573
+ brightRed: "\x1b[91m",
574
+ brightGreen: "\x1b[92m",
575
+ brightYellow: "\x1b[93m",
576
+ brightBlue: "\x1b[94m",
577
+ brightMagenta: "\x1b[95m",
578
+ brightCyan: "\x1b[96m",
579
+ brightWhite: "\x1b[97m",
580
+ };
581
+ const logColor = (message, color) => {
582
+ console.log(`${COLORS[color]}${message}${COLORS.reset}`);
583
+ };
584
+ exports.log = {
585
+ black: (message) => logColor(message, "black"),
586
+ red: (message) => logColor(message, "red"),
587
+ green: (message) => logColor(message, "green"),
588
+ yellow: (message) => logColor(message, "yellow"),
589
+ blue: (message) => logColor(message, "blue"),
590
+ magenta: (message) => logColor(message, "magenta"),
591
+ cyan: (message) => logColor(message, "cyan"),
592
+ white: (message) => logColor(message, "white"),
593
+ gray: (message) => logColor(message, "gray"),
594
+ brightRed: (message) => logColor(message, "brightRed"),
595
+ brightGreen: (message) => logColor(message, "brightGreen"),
596
+ brightYellow: (message) => logColor(message, "brightYellow"),
597
+ brightBlue: (message) => logColor(message, "brightBlue"),
598
+ brightMagenta: (message) => logColor(message, "brightMagenta"),
599
+ brightCyan: (message) => logColor(message, "brightCyan"),
600
+ brightWhite: (message) => logColor(message, "brightWhite"),
601
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ofsc-utility",
3
- "version": "1.0.54",
3
+ "version": "1.0.56",
4
4
  "description": "TypeScript helpers for Oracle Field Service Cloud (OFSC): events, resources, inventories, metadata and CSV/Excel utilities.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/readme.md CHANGED
@@ -127,6 +127,7 @@ The package exposes both top-level helpers and grouped namespaces. This list is
127
127
  - `getInventoryTypesDetail`
128
128
  - `updateCreateInventoryType`
129
129
  - `getAllActivities`
130
+ - `getAllScheduledActivities`
130
131
  - `getAllNonScheduledActivities`
131
132
  - `getActivitybyId`
132
133
  - `startActivity`
@@ -148,6 +149,7 @@ The module-level namespace exports are:
148
149
 
149
150
  - `ofs.Activity`
150
151
  - `getAllActivities`
152
+ - `getAllScheduledActivities`
151
153
  - `getAllNonScheduledActivities`
152
154
  - `getActivitybyId`
153
155
  - `startActivity`
@@ -871,6 +873,13 @@ const activityData = await ofs.Activity.getActivitybyId(
871
873
  123456,
872
874
  );
873
875
 
876
+ const scheduledActivities = await ofs.Activity.getAllScheduledActivities(
877
+ process.env.CLIENT_ID,
878
+ process.env.CLIENT_SECRET,
879
+ process.env.INSTANCE_NAME,
880
+ "US",
881
+ );
882
+
874
883
  const nonScheduledActivities = await ofs.Activity.getAllNonScheduledActivities(
875
884
  process.env.CLIENT_ID,
876
885
  process.env.CLIENT_SECRET,
@@ -879,6 +888,7 @@ const nonScheduledActivities = await ofs.Activity.getAllNonScheduledActivities(
879
888
  "activityId,activityType,status",
880
889
  );
881
890
 
891
+ console.log("Scheduled activities:", scheduledActivities.length);
882
892
  console.log("Non-scheduled activities:", nonScheduledActivities.length);
883
893
 
884
894
  await ofs.Activity.startActivity(
@@ -938,8 +948,9 @@ const inventoryDetail = await ofs.InventoryType.getInventoryTypesDetail(
938
948
 
939
949
  ### Activity lifecycle actions
940
950
 
941
- The activity action helpers let you transition an OFSC activity through its standard custom actions and list non-scheduled activity work:
951
+ The activity helper set lets you query scheduled and non-scheduled activity work, then transition an OFSC activity through its standard lifecycle actions:
942
952
 
953
+ - `getAllScheduledActivities(clientId, clientSecret, instanceUrl, rootBucket)`
943
954
  - `getAllNonScheduledActivities(clientId, clientSecret, instanceUrl, resources, fields?)`
944
955
  - `startActivity(clientId, clientSecret, instanceUrl, activityId)`
945
956
  - `completeActivity(clientId, clientSecret, instanceUrl, activityId)`
@@ -949,7 +960,21 @@ The activity action helpers let you transition an OFSC activity through its stan
949
960
  Example:
950
961
 
951
962
  ```js
952
- let rootBucket="US";
963
+ let rootBucket = "US";
964
+ const scheduled = await ofs.Activity.getAllScheduledActivities(
965
+ process.env.CLIENT_ID,
966
+ process.env.CLIENT_SECRET,
967
+ process.env.INSTANCE_NAME,
968
+ rootBucket,
969
+ );
970
+
971
+ console.log("Scheduled activities:", scheduled.length);
972
+ ```
973
+
974
+ Example:
975
+
976
+ ```js
977
+ let rootBucket = "US";
953
978
  const nonScheduled = await ofs.Activity.getAllNonScheduledActivities(
954
979
  process.env.CLIENT_ID,
955
980
  process.env.CLIENT_SECRET,