@openinc/parse-server-opendash 4.4.0 → 4.4.2

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.
@@ -7,7 +7,6 @@ exports.initServiceSchedulesFeature = initServiceSchedulesFeature;
7
7
  exports.stopServiceSchedulesFeature = stopServiceSchedulesFeature;
8
8
  const node_1 = __importDefault(require("parse/node"));
9
9
  const index_js_1 = require("../../../types/index.js");
10
- const ServiceCalendarSyncPoller_js_1 = require("./calendarSync/ServiceCalendarSyncPoller.js");
11
10
  const ServiceSyncTypes_js_1 = require("./calendarSync/ServiceSyncTypes.js");
12
11
  /** How often the delta feed is asked for changes. */
13
12
  const POLL_INTERVAL_MS = 60 * 1000;
@@ -24,9 +23,10 @@ async function initServiceSchedulesFeature() {
24
23
  .equalTo("key", ServiceSyncTypes_js_1.OUTLOOK_CONFIG_KEY)
25
24
  .includeAll()
26
25
  .findAll({ useMasterKey: true });
27
- for (const config of configs) {
28
- pollers.push(new ServiceCalendarSyncPoller_js_1.ServiceCalendarSyncPoller(config).start(POLL_INTERVAL_MS));
29
- }
26
+ // TODO: Reenable when infinite loop is found
27
+ // for (const config of configs) {
28
+ // pollers.push(new ServiceCalendarSyncPoller(config).start(POLL_INTERVAL_MS));
29
+ // }
30
30
  if (pollers.length > 0) {
31
31
  console.log(`[ServiceCalendarSync] Started for ${pollers.length} calendar connection(s)`);
32
32
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openinc/parse-server-opendash",
3
- "version": "4.4.0",
3
+ "version": "4.4.2",
4
4
  "description": "Parse Server Cloud Code for open.INC Stack.",
5
5
  "packageManager": "pnpm@11.25.0",
6
6
  "keywords": [
@@ -1,79 +0,0 @@
1
- "use strict";
2
- // import Parse from "parse/node";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- // import {
5
- // grantProviderAccess,
6
- // revokeProviderAccess,
7
- // } from "../features/openservice/serviceProviders/index.js";
8
- // import {
9
- // Permissions,
10
- // requirePermission,
11
- // } from "../features/permissions/index.js";
12
- // import { Tenant, type _User } from "../types/index.js";
13
- // /**
14
- // * Grant or revoke an external service provider's access to one maintenance
15
- // * plan.
16
- // *
17
- // * Params: `{ contactId, scheduleId, revoke? }`.
18
- // *
19
- // * **Who may call it.** A logged-in user holding `schedule_create` — the same
20
- // * capability that lets somebody set a plan up in the first place. Creating an
21
- // * account for a stranger and pointing it at a customer's plan is at least as
22
- // * consequential as creating the plan, so it does not get a weaker gate; and
23
- // * `requirePermission` means it is a real gate, not UI that can be walked
24
- // * around by calling the function directly (GRENZEN §2).
25
- // *
26
- // * The tenant comes from the caller's account, never from a parameter.
27
- // */
28
- // export async function init(name: string) {
29
- // Parse.Cloud.define(
30
- // name,
31
- // async (request) => {
32
- // await requirePermission(
33
- // {
34
- // sessionToken: request.user?.getSessionToken(),
35
- // master: request.master,
36
- // },
37
- // Permissions.SERVICE.schedule_create,
38
- // "Granting service provider access requires schedule creation rights.",
39
- // );
40
- // const user = request.user as _User | undefined;
41
- // const tenant = user?.get("tenant") as Tenant | undefined;
42
- // if (!tenant) {
43
- // throw new Parse.Error(
44
- // Parse.Error.OPERATION_FORBIDDEN,
45
- // `${name}: the calling user has no tenant`,
46
- // );
47
- // }
48
- // const { contactId, scheduleId, revoke } = request.params as {
49
- // contactId?: string;
50
- // scheduleId?: string;
51
- // revoke?: boolean;
52
- // };
53
- // if (!contactId || !scheduleId) {
54
- // throw new Parse.Error(
55
- // Parse.Error.INVALID_QUERY,
56
- // `${name} needs "contactId" and "scheduleId"`,
57
- // );
58
- // }
59
- // if (revoke) {
60
- // const result = await revokeProviderAccess(
61
- // tenant,
62
- // contactId,
63
- // scheduleId,
64
- // );
65
- // console.log(
66
- // `[${name}] revoked contact ${contactId} from schedule ${scheduleId}`,
67
- // );
68
- // return result;
69
- // }
70
- // const result = await grantProviderAccess(tenant, contactId, scheduleId);
71
- // console.log(
72
- // `[${name}] granted contact ${contactId} on schedule ${scheduleId} ` +
73
- // `as user ${result.userId}${result.created ? " (new account)" : ""}`,
74
- // );
75
- // return result;
76
- // },
77
- // { requireUser: true },
78
- // );
79
- // }