@antelopejs/dms-saas 0.3.1 → 0.3.3
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/README.md +0 -86
- package/dist/config/runtime.d.ts +0 -1
- package/dist/config/runtime.js +0 -7
- package/dist/config/runtime.js.map +1 -1
- package/dist/data-api/platformOwner/index.d.ts +0 -1
- package/dist/data-api/platformOwner/index.js +0 -1
- package/dist/data-api/platformOwner/index.js.map +1 -1
- package/dist/data-api/tenant/index.d.ts +0 -1
- package/dist/data-api/tenant/index.js +0 -1
- package/dist/data-api/tenant/index.js.map +1 -1
- package/dist/notifications/subjects.d.ts +0 -2
- package/dist/notifications/subjects.js +1 -13
- package/dist/notifications/subjects.js.map +1 -1
- package/dist/pages/platform/categories.d.ts +0 -1
- package/dist/pages/platform/categories.js +1 -8
- package/dist/pages/platform/categories.js.map +1 -1
- package/dist/pages/platform/index.d.ts +0 -1
- package/dist/pages/platform/index.js +0 -1
- package/dist/pages/platform/index.js.map +1 -1
- package/dist/pages/tenant/index.d.ts +0 -1
- package/dist/pages/tenant/index.js +0 -1
- package/dist/pages/tenant/index.js.map +1 -1
- package/dist/routes/platformOwner/index.d.ts +0 -1
- package/dist/routes/platformOwner/index.js +0 -1
- package/dist/routes/platformOwner/index.js.map +1 -1
- package/dist/routes/public/register.js +1 -3
- package/dist/routes/public/register.js.map +1 -1
- package/dist/routes/tenant/index.d.ts +0 -1
- package/dist/routes/tenant/index.js +0 -1
- package/dist/routes/tenant/index.js.map +1 -1
- package/dist/routes/tenant/tenant-billing.d.ts +2 -1
- package/dist/routes/tenant/tenant-billing.js +14 -11
- package/dist/routes/tenant/tenant-billing.js.map +1 -1
- package/dist/stripe/webhook-handlers.js +19 -20
- package/dist/stripe/webhook-handlers.js.map +1 -1
- package/dist/stripe/webhook-shared.js +9 -11
- package/dist/stripe/webhook-shared.js.map +1 -1
- package/dist/types/config.d.ts +0 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/keyed-insert.d.ts +7 -0
- package/dist/utils/keyed-insert.js +14 -0
- package/dist/utils/keyed-insert.js.map +1 -0
- package/dist/workspaces/provisioning.js +22 -27
- package/dist/workspaces/provisioning.js.map +1 -1
- package/frontend-vue/i18n/locales/saas-en-GB.json +1 -142
- package/frontend-vue/i18n/locales/saas-fr-FR.json +1 -142
- package/package.json +7 -9
- package/dist/data-api/platformOwner/support.d.ts +0 -58
- package/dist/data-api/platformOwner/support.js +0 -111
- package/dist/data-api/platformOwner/support.js.map +0 -1
- package/dist/data-api/support-fields.d.ts +0 -49
- package/dist/data-api/support-fields.js +0 -166
- package/dist/data-api/support-fields.js.map +0 -1
- package/dist/data-api/support-routes.d.ts +0 -10
- package/dist/data-api/support-routes.js +0 -71
- package/dist/data-api/support-routes.js.map +0 -1
- package/dist/data-api/tenant/support.d.ts +0 -39
- package/dist/data-api/tenant/support.js +0 -53
- package/dist/data-api/tenant/support.js.map +0 -1
- package/dist/pages/platform/support.d.ts +0 -9
- package/dist/pages/platform/support.js +0 -29
- package/dist/pages/platform/support.js.map +0 -1
- package/dist/pages/tenant/support.d.ts +0 -9
- package/dist/pages/tenant/support.js +0 -27
- package/dist/pages/tenant/support.js.map +0 -1
- package/dist/routes/platformOwner/support.d.ts +0 -21
- package/dist/routes/platformOwner/support.js +0 -180
- package/dist/routes/platformOwner/support.js.map +0 -1
- package/dist/routes/tenant/support.d.ts +0 -27
- package/dist/routes/tenant/support.js +0 -185
- package/dist/routes/tenant/support.js.map +0 -1
- package/dist/support/admissions.d.ts +0 -36
- package/dist/support/admissions.js +0 -136
- package/dist/support/admissions.js.map +0 -1
- package/dist/support/attachments.d.ts +0 -12
- package/dist/support/attachments.js +0 -56
- package/dist/support/attachments.js.map +0 -1
- package/dist/support/config.d.ts +0 -19
- package/dist/support/config.js +0 -75
- package/dist/support/config.js.map +0 -1
- package/dist/support/index.d.ts +0 -6
- package/dist/support/index.js +0 -23
- package/dist/support/index.js.map +0 -1
- package/dist/support/operations.d.ts +0 -51
- package/dist/support/operations.js +0 -109
- package/dist/support/operations.js.map +0 -1
- package/dist/support/plans.d.ts +0 -6
- package/dist/support/plans.js +0 -130
- package/dist/support/plans.js.map +0 -1
- package/dist/support/publications.d.ts +0 -8
- package/dist/support/publications.js +0 -106
- package/dist/support/publications.js.map +0 -1
- package/dist/support/recovery.d.ts +0 -7
- package/dist/support/recovery.js +0 -43
- package/dist/support/recovery.js.map +0 -1
- package/dist/support/service.d.ts +0 -51
- package/dist/support/service.js +0 -143
- package/dist/support/service.js.map +0 -1
- package/dist/support/transitions.d.ts +0 -4
- package/dist/support/transitions.js +0 -29
- package/dist/support/transitions.js.map +0 -1
- package/dist/support/uploads.d.ts +0 -39
- package/dist/support/uploads.js +0 -115
- package/dist/support/uploads.js.map +0 -1
- package/dist/support/validation.d.ts +0 -15
- package/dist/support/validation.js +0 -54
- package/dist/support/validation.js.map +0 -1
- package/frontend-vue/app/components/PlatformSupport.vue +0 -461
- package/frontend-vue/app/components/SupportAttachmentUpload.vue +0 -140
- package/frontend-vue/app/components/SupportThreadHistory.vue +0 -139
- package/frontend-vue/app/components/TenantSupport.vue +0 -415
- package/frontend-vue/app/composables/useSupportRequest.ts +0 -74
- package/frontend-vue/app/types/support.ts +0 -123
package/README.md
CHANGED
|
@@ -91,51 +91,6 @@ do not need a separate tenant-owner grant list. Subscription access gates remain
|
|
|
91
91
|
independent and unchanged. This resolver alone does not constrain
|
|
92
92
|
`defaultGranted` permissions or guards that do not consult effective permissions.
|
|
93
93
|
|
|
94
|
-
## Native support tickets
|
|
95
|
-
|
|
96
|
-
The Support page stores tickets, messages, and ticket events in the active
|
|
97
|
-
tenant schema. Platform ticket listing uses `CROSS_INSTANCE`; MongoDB's
|
|
98
|
-
`_instance` identifies each ticket's tenant. Detail reads and writes use that
|
|
99
|
-
tenant's scoped models.
|
|
100
|
-
|
|
101
|
-
Support listings use the Data API endpoints:
|
|
102
|
-
|
|
103
|
-
- `/api/saas/tenant/tables/support-tickets/list`
|
|
104
|
-
- `/api/saas/tables/support-tickets/list`
|
|
105
|
-
- `/api/saas/tables/support-owners/list`
|
|
106
|
-
- Existing tenant and platform detail URLs, with `/messages/list` and
|
|
107
|
-
`/events/list` children (and `/count` variants)
|
|
108
|
-
|
|
109
|
-
List queries accept `offset`, `limit`, `sortKey`, `sortDirection`, and
|
|
110
|
-
`filter_<field>`. Responses contain `{ results, total, offset, limit }`. Owner
|
|
111
|
-
rows contain `_id`, `name`, and `email`. Global ticket rows include the joined
|
|
112
|
-
`tenantName`.
|
|
113
|
-
|
|
114
|
-
Pages default to 20 rows and are capped at 100. String filters use the DMS
|
|
115
|
-
comparison modes, for example `filter_status=is:open`. Recent-first reads keep
|
|
116
|
-
timestamp/ID compound ordering. Message and event pagination loads only the
|
|
117
|
-
requested collection; ticket scope is enforced by the server.
|
|
118
|
-
|
|
119
|
-
Status and assignment changes record the actor, previous/new values, and time
|
|
120
|
-
in `support_ticket_events`. This includes automatic reply transitions: support
|
|
121
|
-
replies wait for the customer, and customer replies resume tickets waiting for
|
|
122
|
-
them. Existing tickets start with no historical events; old history is not
|
|
123
|
-
invented. Existing central mirror data is unused and is not automatically deleted.
|
|
124
|
-
|
|
125
|
-
Support level comes from the inherited plan feature whose id is
|
|
126
|
-
`support-sla`. Supported string values are `community`, `email`, `priority`,
|
|
127
|
-
and `dedicated`. An absent or invalid value falls back to community support.
|
|
128
|
-
Those levels respectively expose normal; low/normal; low/normal/high; and all
|
|
129
|
-
priorities. Displayed first-response targets are no guarantee, 48 business
|
|
130
|
-
hours, 8 business hours, and 2 elapsed hours.
|
|
131
|
-
|
|
132
|
-
Attachments use the DMS upload token and staging flow below the tenant-bound
|
|
133
|
-
`support-attachments/{tenantId}` path. A message accepts up to five image, PDF,
|
|
134
|
-
or text files of 10 MiB each. Only staged keys from that tenant path are
|
|
135
|
-
accepted, each is promoted before the tenant message is persisted, and failed
|
|
136
|
-
writes move promoted files back to staging. Ticket-specific metadata routes
|
|
137
|
-
verify that a key belongs to the requested thread before issuing its read URL.
|
|
138
|
-
|
|
139
94
|
## Registration
|
|
140
95
|
|
|
141
96
|
Public registration is short: an account (name, e-mail, password) and the
|
|
@@ -881,47 +836,6 @@ Register consumers before startup reconciliation; use the existing
|
|
|
881
836
|
tenant inventory and gate for bootstrap/backfill rather than treating `created`
|
|
882
837
|
as a historical inventory API.
|
|
883
838
|
|
|
884
|
-
## Support attachment storage and recovery
|
|
885
|
-
|
|
886
|
-
Configure `supportStorage` with an explicit named file-storage definition. Support
|
|
887
|
-
issues private staged uploads through its tenant-member `/api/saas/support/uploads`
|
|
888
|
-
route and persists the tenant, source key and storage name before returning the
|
|
889
|
-
upload capability. Native `/api/files` routes do not authorize support files.
|
|
890
|
-
Support read routes check ticket/message membership before minting a read URL.
|
|
891
|
-
|
|
892
|
-
Keep every old named storage definition unchanged while its uploads, receipts or
|
|
893
|
-
files remain live. Selecting a new `supportStorage` name affects only new uploads;
|
|
894
|
-
existing receipts retain their original routing. Unknown names fail closed. A name
|
|
895
|
-
does not identify a provider incarnation and cannot detect remapping that same
|
|
896
|
-
name to a different backend. Use isolated nonreused keys and prevent privileged or
|
|
897
|
-
external writers from modifying support objects.
|
|
898
|
-
|
|
899
|
-
The storage adapter must provide write-once uploads and dedicated no-clobber
|
|
900
|
-
`PromoteFile`, with trusted-origin replay and private visibility preservation.
|
|
901
|
-
Promotion moves a staged upload to its canonical key without the staging prefix;
|
|
902
|
-
support never retains an expiring staged key as the published reference. Support
|
|
903
|
-
records positive promotion confirmation before validating final metadata, then
|
|
904
|
-
uses the existing database operation receipt to authorize publication. Published
|
|
905
|
-
prerequisites are the database interface `0.1.6`, the storage interface `0.1.3`,
|
|
906
|
-
and a compatible provider: local `0.1.4` or S3 `0.1.3`, all of which any DMS
|
|
907
|
-
release carrying this module provides. Tests use MongoDB `1.3.1`.
|
|
908
|
-
|
|
909
|
-
Source admissions remain insert-only and permanent. Rejected work cannot publish,
|
|
910
|
-
even if a delayed promotion finishes. Owner-initiated paginated support recovery
|
|
911
|
-
repeats ordinary deletion of owned rejected sources and positively confirmed
|
|
912
|
-
finals. It never promotes rejected work just to establish cleanup ownership and
|
|
913
|
-
never deletes an unconfirmed or foreign final. Uncertain acknowledgements can
|
|
914
|
-
therefore retain private orphans. Recovery is not autonomous garbage collection;
|
|
915
|
-
operators must repeat complete passes, including after delayed uploads finish.
|
|
916
|
-
Already issued signed read URLs remain valid until their normal expiry.
|
|
917
|
-
|
|
918
|
-
Never-submitted upload receipts have no operation to recover. Configure provider
|
|
919
|
-
staging expiry for abandoned bytes; permanent issuance/admission metadata is not
|
|
920
|
-
automatically collected. Upload capabilities and in-flight writes can outlive a
|
|
921
|
-
cleanup pass, so storage expiry/operational cleanup must account for them. Do not
|
|
922
|
-
delete receipts to free a source for another request or garbage-collect a file
|
|
923
|
-
that a committed support message still references.
|
|
924
|
-
|
|
925
839
|
## Upgrading
|
|
926
840
|
|
|
927
841
|
### Rows written by earlier builds
|
package/dist/config/runtime.d.ts
CHANGED
|
@@ -6,6 +6,5 @@ export declare function resolveRegistrationPaymentMethodId(paymentMethodId: stri
|
|
|
6
6
|
export declare function getDefaultPlanSlug(): string | undefined;
|
|
7
7
|
export declare function getUpcomingInvoicePreviewCacheTtlMs(): number;
|
|
8
8
|
export declare function getAllowedRedirectHosts(): string[];
|
|
9
|
-
export declare function getSupportStorage(): string;
|
|
10
9
|
export declare function assertAdmissionOpen(isPlatformOwner?: boolean): void;
|
|
11
10
|
export declare function isAllowedRedirectUrl(rawUrl: string): boolean;
|
package/dist/config/runtime.js
CHANGED
|
@@ -7,7 +7,6 @@ exports.resolveRegistrationPaymentMethodId = resolveRegistrationPaymentMethodId;
|
|
|
7
7
|
exports.getDefaultPlanSlug = getDefaultPlanSlug;
|
|
8
8
|
exports.getUpcomingInvoicePreviewCacheTtlMs = getUpcomingInvoicePreviewCacheTtlMs;
|
|
9
9
|
exports.getAllowedRedirectHosts = getAllowedRedirectHosts;
|
|
10
|
-
exports.getSupportStorage = getSupportStorage;
|
|
11
10
|
exports.assertAdmissionOpen = assertAdmissionOpen;
|
|
12
11
|
exports.isAllowedRedirectUrl = isAllowedRedirectUrl;
|
|
13
12
|
const interface_api_util_1 = require("@antelopejs/interface-api-util");
|
|
@@ -16,7 +15,6 @@ const dev_mode_1 = require("./dev-mode");
|
|
|
16
15
|
const REDIRECT_PROTOCOLS = ["http:", "https:"];
|
|
17
16
|
const LOOPBACK_HOSTNAMES = ["localhost", "127.0.0.1", "::1", "[::1]"];
|
|
18
17
|
const HTTP_BAD_REQUEST = 400;
|
|
19
|
-
const HTTP_UNAVAILABLE = 503;
|
|
20
18
|
const ADMISSION_MODES = ["open", "invitation-only"];
|
|
21
19
|
const DEFAULT_UPCOMING_INVOICE_PREVIEW_CACHE_TTL_SECONDS = 3600;
|
|
22
20
|
const MS_PER_SECOND = 1000;
|
|
@@ -71,11 +69,6 @@ function getUpcomingInvoicePreviewCacheTtlMs() {
|
|
|
71
69
|
function getAllowedRedirectHosts() {
|
|
72
70
|
return runtimeConfig?.allowedRedirectHosts ?? [];
|
|
73
71
|
}
|
|
74
|
-
function getSupportStorage() {
|
|
75
|
-
const storage = runtimeConfig?.supportStorage;
|
|
76
|
-
(0, interface_api_util_1.assert)(typeof storage === "string" && storage.trim().length > 0, HTTP_UNAVAILABLE, "saas.errors.support.storage_unavailable");
|
|
77
|
-
return storage;
|
|
78
|
-
}
|
|
79
72
|
function assertAdmissionOpen(isPlatformOwner = false) {
|
|
80
73
|
const HTTP_FORBIDDEN = 403;
|
|
81
74
|
(0, interface_api_util_1.assert)(isPlatformOwner || runtimeConfig?.admissionMode !== "invitation-only", HTTP_FORBIDDEN, "saas.errors.registration_closed");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/config/runtime.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"runtime.js","sourceRoot":"","sources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Ac,EACd,iCAAiC,CAClC,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,MAAc;IACtC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;QAC/B,OAAO,kBAAkB,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;IAC3E,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED,SAAS,aAAa,CAAC,GAAQ;IAC7B,OAAO,kBAAkB,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACnD,CAAC;AAUD,SAAgB,oBAAoB,CAAC,MAAc;IACjD,MAAM,MAAM,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACxC,IAAI,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IAC1B,IAAI,IAAA,oBAAS,GAAE,IAAI,aAAa,CAAC,MAAM,CAAC;QAAE,OAAO,IAAI,CAAC;IACtD,OAAO,uBAAuB,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACzD,CAAC"}
|
|
@@ -24,7 +24,6 @@ __exportStar(require("./members"), exports);
|
|
|
24
24
|
__exportStar(require("./plan-migrations"), exports);
|
|
25
25
|
__exportStar(require("./plans"), exports);
|
|
26
26
|
__exportStar(require("./segments"), exports);
|
|
27
|
-
__exportStar(require("./support"), exports);
|
|
28
27
|
__exportStar(require("./users"), exports);
|
|
29
28
|
__exportStar(require("./workspaces"), exports);
|
|
30
29
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/data-api/platformOwner/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,0DAAwC;AACxC,iDAA+B;AAC/B,6CAA2B;AAC3B,gDAA8B;AAC9B,6CAA2B;AAC3B,4CAA0B;AAC1B,oDAAkC;AAClC,0CAAwB;AACxB,6CAA2B;AAC3B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/data-api/platformOwner/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,0DAAwC;AACxC,iDAA+B;AAC/B,6CAA2B;AAC3B,gDAA8B;AAC9B,6CAA2B;AAC3B,4CAA0B;AAC1B,oDAAkC;AAClC,0CAAwB;AACxB,6CAA2B;AAC3B,0CAAwB;AACxB,+CAA6B"}
|
|
@@ -14,6 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./support"), exports);
|
|
18
17
|
__exportStar(require("./tenant-invoices"), exports);
|
|
19
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/data-api/tenant/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/data-api/tenant/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC"}
|
|
@@ -15,7 +15,5 @@ export declare const platformOwnerAddedSubject: import("@antelopejs/interface-dm
|
|
|
15
15
|
export declare const platformOwnerRemovedSubject: import("@antelopejs/interface-dms/notifications/types").NotificationSubjectInfo;
|
|
16
16
|
export declare const workspaceReactivatedSubject: import("@antelopejs/interface-dms/notifications/types").NotificationSubjectInfo;
|
|
17
17
|
export declare const seatOverageSubject: import("@antelopejs/interface-dms/notifications/types").NotificationSubjectInfo;
|
|
18
|
-
export declare const supportNewMessageSubject: import("@antelopejs/interface-dms/notifications/types").NotificationSubjectInfo;
|
|
19
|
-
export declare const supportStatusChangedSubject: import("@antelopejs/interface-dms/notifications/types").NotificationSubjectInfo;
|
|
20
18
|
export declare const complimentaryAccessGrantedSubject: import("@antelopejs/interface-dms/notifications/types").NotificationSubjectInfo;
|
|
21
19
|
export declare const automationNotificationSubject: import("@antelopejs/interface-dms/notifications/types").NotificationSubjectInfo;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.automationNotificationSubject = exports.complimentaryAccessGrantedSubject = exports.
|
|
3
|
+
exports.automationNotificationSubject = exports.complimentaryAccessGrantedSubject = exports.seatOverageSubject = exports.workspaceReactivatedSubject = exports.platformOwnerRemovedSubject = exports.platformOwnerAddedSubject = exports.refundProcessedSubject = exports.creditNoteIssuedSubject = exports.subscriptionCancelledSubject = exports.freeWorkspaceEndingSoonSubject = exports.freeWorkspaceExpiredSubject = exports.workspaceSuspendedSubject = exports.paymentFailedSubject = exports.trialEndedBlockedSubject = exports.trialEndingSoonSubject = exports.planMigratedSubject = exports.SaasCategory = void 0;
|
|
4
4
|
const notifications_1 = require("@antelopejs/interface-dms/notifications");
|
|
5
5
|
exports.SaasCategory = (0, notifications_1.NotificationCategory)("saas", {
|
|
6
6
|
labelKey: "saas.notifications.category.label",
|
|
@@ -23,8 +23,6 @@ const SUBJECT_KEYS = {
|
|
|
23
23
|
freeWorkspaceEndingSoon: "saas.notifications.subjects.free_workspace_ending_soon",
|
|
24
24
|
workspaceReactivated: "saas.notifications.subjects.workspace_reactivated",
|
|
25
25
|
seatOverage: "saas.notifications.subjects.seat_overage",
|
|
26
|
-
supportNewMessage: "saas.notifications.subjects.support_new_message",
|
|
27
|
-
supportStatusChanged: "saas.notifications.subjects.support_status_changed",
|
|
28
26
|
complimentaryAccessGranted: "saas.notifications.subjects.complimentary_access_granted",
|
|
29
27
|
automation: "saas.notifications.subjects.automation",
|
|
30
28
|
};
|
|
@@ -98,16 +96,6 @@ exports.seatOverageSubject = (0, notifications_1.NotificationSubject)("saas.seat
|
|
|
98
96
|
labelKey: SUBJECT_KEYS.seatOverage,
|
|
99
97
|
togglePermission: "default",
|
|
100
98
|
});
|
|
101
|
-
exports.supportNewMessageSubject = (0, notifications_1.NotificationSubject)("saas.support_new_message", {
|
|
102
|
-
category: exports.SaasCategory,
|
|
103
|
-
labelKey: SUBJECT_KEYS.supportNewMessage,
|
|
104
|
-
togglePermission: "default",
|
|
105
|
-
});
|
|
106
|
-
exports.supportStatusChangedSubject = (0, notifications_1.NotificationSubject)("saas.support_status_changed", {
|
|
107
|
-
category: exports.SaasCategory,
|
|
108
|
-
labelKey: SUBJECT_KEYS.supportStatusChanged,
|
|
109
|
-
togglePermission: "default",
|
|
110
|
-
});
|
|
111
99
|
exports.complimentaryAccessGrantedSubject = (0, notifications_1.NotificationSubject)("saas.complimentary_access_granted", {
|
|
112
100
|
category: exports.SaasCategory,
|
|
113
101
|
labelKey: SUBJECT_KEYS.complimentaryAccessGranted,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subjects.js","sourceRoot":"","sources":["../../src/notifications/subjects.ts"],"names":[],"mappings":";;;AAAA,2EAGiD;AAIpC,QAAA,YAAY,GAAG,IAAA,oCAAoB,EAAC,MAAM,EAAE;IACvD,QAAQ,EAAE,mCAAmC;IAC7C,cAAc,EAAE,yCAAyC;IACzD,IAAI,EAAE,gBAAgB;IACtB,gBAAgB,EAAE,SAAS;CAC5B,CAAC,CAAC;AAEH,MAAM,YAAY,GAAG;IACnB,YAAY,EAAE,2CAA2C;IACzD,eAAe,EAAE,+CAA+C;IAChE,iBAAiB,EAAE,iDAAiD;IACpE,aAAa,EAAE,4CAA4C;IAC3D,kBAAkB,EAAE,iDAAiD;IACrE,qBAAqB,EAAE,oDAAoD;IAC3E,gBAAgB,EAAE,gDAAgD;IAClE,eAAe,EAAE,8CAA8C;IA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
@@ -3,4 +3,3 @@ export declare const customersCategory: import("@antelopejs/interface-dms").Cate
|
|
|
3
3
|
export declare const catalogCategory: import("@antelopejs/interface-dms").CategoryInfo;
|
|
4
4
|
export declare const billingCategory: import("@antelopejs/interface-dms").CategoryInfo;
|
|
5
5
|
export declare const configurationCategory: import("@antelopejs/interface-dms").CategoryInfo;
|
|
6
|
-
export declare const supportCategory: import("@antelopejs/interface-dms").CategoryInfo;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.configurationCategory = exports.billingCategory = exports.catalogCategory = exports.customersCategory = exports.overviewCategory = void 0;
|
|
4
4
|
const page_1 = require("@antelopejs/interface-dms/page");
|
|
5
5
|
const module_1 = require("../module");
|
|
6
6
|
exports.overviewCategory = (0, page_1.Category)("overview", {
|
|
@@ -38,11 +38,4 @@ exports.configurationCategory = (0, page_1.Category)("configuration", {
|
|
|
38
38
|
type: "label",
|
|
39
39
|
order: 40,
|
|
40
40
|
});
|
|
41
|
-
exports.supportCategory = (0, page_1.Category)("support", {
|
|
42
|
-
displayName: "$saas.menu.support",
|
|
43
|
-
category: module_1.saasModule,
|
|
44
|
-
icon: "i-ph-lifebuoy",
|
|
45
|
-
type: "label",
|
|
46
|
-
order: 35,
|
|
47
|
-
});
|
|
48
41
|
//# sourceMappingURL=categories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"categories.js","sourceRoot":"","sources":["../../../src/pages/platform/categories.ts"],"names":[],"mappings":";;;AAAA,yDAA0D;AAC1D,sCAAuC;AAE1B,QAAA,gBAAgB,GAAG,IAAA,eAAQ,EAAC,UAAU,EAAE;IACnD,WAAW,EAAE,qBAAqB;IAClC,QAAQ,EAAE,mBAAU;IACpB,IAAI,EAAE,YAAY;IAClB,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,CAAC;CACT,CAAC,CAAC;AAEU,Q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kB;IACxB,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,EAAE;CACV,CAAC,CAAC;AAEU,QAAA,eAAe,GAAG,IAAA,eAAQ,EAAC,SAAS,EAAE;IACjD,WAAW,EAAE,oBAAoB;IACjC,QAAQ,EAAE,mBAAU;IACpB,IAAI,EAAE,cAAc;IACpB,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,EAAE;CACV,CAAC,CAAC;AAEU,QAAA,eAAe,GAAG,IAAA,eAAQ,EAAC,SAAS,EAAE;IACjD,WAAW,EAAE,oBAAoB;IACjC,QAAQ,EAAE,mBAAU;IACpB,IAAI,EAAE,cAAc;IACpB,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,EAAE;CACV,CAAC,CAAC;AAEU,QAAA,qBAAqB,GAAG,IAAA,eAAQ,EAAC,eAAe,EAAE;IAC7D,WAAW,EAAE,0BAA0B;IACvC,QAAQ,EAAE,mBAAU;IACpB,IAAI,EAAE,cAAc;IACpB,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,EAAE;CACV,CAAC,CAAC"}
|
|
@@ -24,7 +24,6 @@ __exportStar(require("./plans/edit"), exports);
|
|
|
24
24
|
__exportStar(require("./plans/migrations"), exports);
|
|
25
25
|
__exportStar(require("./segments"), exports);
|
|
26
26
|
__exportStar(require("./settings"), exports);
|
|
27
|
-
__exportStar(require("./support"), exports);
|
|
28
27
|
__exportStar(require("./users"), exports);
|
|
29
28
|
__exportStar(require("./users/detail"), exports);
|
|
30
29
|
__exportStar(require("./workspaces"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/pages/platform/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,iDAA+B;AAC/B,8CAA4B;AAC5B,6CAA2B;AAC3B,6CAA2B;AAC3B,0CAAwB;AACxB,+CAA6B;AAC7B,qDAAmC;AACnC,6CAA2B;AAC3B,6CAA2B;AAC3B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/pages/platform/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,iDAA+B;AAC/B,8CAA4B;AAC5B,6CAA2B;AAC3B,6CAA2B;AAC3B,0CAAwB;AACxB,+CAA6B;AAC7B,qDAAmC;AACnC,6CAA2B;AAC3B,6CAA2B;AAC3B,0CAAwB;AACxB,iDAA+B;AAC/B,+CAA6B;AAC7B,sDAAoC"}
|
|
@@ -18,6 +18,5 @@ __exportStar(require("./billing"), exports);
|
|
|
18
18
|
__exportStar(require("./data-export"), exports);
|
|
19
19
|
__exportStar(require("./general"), exports);
|
|
20
20
|
__exportStar(require("./members-seat-quota"), exports);
|
|
21
|
-
__exportStar(require("./support"), exports);
|
|
22
21
|
__exportStar(require("./workspace-suspended"), exports);
|
|
23
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/pages/tenant/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,gDAA8B;AAC9B,4CAA0B;AAC1B,uDAAqC;AACrC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/pages/tenant/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,gDAA8B;AAC9B,4CAA0B;AAC1B,uDAAqC;AACrC,wDAAsC"}
|
|
@@ -6,7 +6,6 @@ export * from "./plans";
|
|
|
6
6
|
export * from "./platform-notes";
|
|
7
7
|
export * from "./platform-owners";
|
|
8
8
|
export * from "./segments";
|
|
9
|
-
export * from "./support";
|
|
10
9
|
export * from "./users-detail";
|
|
11
10
|
export * from "./workspace-invitations";
|
|
12
11
|
export * from "./workspace-operator-actions";
|
|
@@ -22,7 +22,6 @@ __exportStar(require("./plans"), exports);
|
|
|
22
22
|
__exportStar(require("./platform-notes"), exports);
|
|
23
23
|
__exportStar(require("./platform-owners"), exports);
|
|
24
24
|
__exportStar(require("./segments"), exports);
|
|
25
|
-
__exportStar(require("./support"), exports);
|
|
26
25
|
__exportStar(require("./users-detail"), exports);
|
|
27
26
|
__exportStar(require("./workspace-invitations"), exports);
|
|
28
27
|
__exportStar(require("./workspace-operator-actions"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/routes/platformOwner/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,uDAAqC;AACrC,8CAA4B;AAC5B,kDAAgC;AAChC,0CAAwB;AACxB,mDAAiC;AACjC,oDAAkC;AAClC,6CAA2B;AAC3B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/routes/platformOwner/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,uDAAqC;AACrC,8CAA4B;AAC5B,kDAAgC;AAChC,0CAAwB;AACxB,mDAAiC;AACjC,oDAAkC;AAClC,6CAA2B;AAC3B,iDAA+B;AAC/B,0DAAwC;AACxC,+DAA6C;AAC7C,qDAAmC"}
|
|
@@ -92,9 +92,7 @@ class SaasRegisterApiController extends (0, interface_api_1.Controller)("/api/sa
|
|
|
92
92
|
const sessionId = await (0, auth_1.createSession)(this.sessionModel, user._id, this.userAgent || "", this.forwardedFor || "");
|
|
93
93
|
const accessTokenData = await (0, auth_1.generateAccessToken)(tenantId, user, sessionId);
|
|
94
94
|
const refreshTokenData = await (0, auth_1.generateRefreshToken)(tenantId, user, sessionId);
|
|
95
|
-
await this.sessionModel.
|
|
96
|
-
refreshToken: refreshTokenData.token,
|
|
97
|
-
});
|
|
95
|
+
await this.sessionModel.replaceRefreshToken(sessionId, refreshTokenData.token);
|
|
98
96
|
return {
|
|
99
97
|
token_type: "Bearer",
|
|
100
98
|
access_token: accessTokenData.token,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":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ing-portal"), exports);
|
|
18
18
|
__exportStar(require("./billing-self-refund"), exports);
|
|
19
19
|
__exportStar(require("./data-export"), exports);
|
|
20
|
-
__exportStar(require("./support"), exports);
|
|
21
20
|
__exportStar(require("./tenant-billing"), exports);
|
|
22
21
|
__exportStar(require("./tenant-plan"), exports);
|
|
23
22
|
__exportStar(require("./tenant-plan-ops"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/routes/tenant/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,wDAAsC;AACtC,gDAA8B;AAC9B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/routes/tenant/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,wDAAsC;AACtC,gDAA8B;AAC9B,mDAAiC;AACjC,gDAA8B;AAC9B,oDAAkC;AAClC,iDAA+B;AAC/B,+CAA6B"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type RequestContext } from "@antelopejs/interface-api";
|
|
1
2
|
import type { User } from "@antelopejs/interface-dms/auth/db";
|
|
2
3
|
import { type TenantBillingAddress, TenantBillingInfoModel, type TenantCustomerType, TenantSubscriptionModel, type VatVerificationStatus } from "../../db";
|
|
3
4
|
import { type BillingIdentityField, type BillingIdentityInput } from "../../workspaces/billing-identity";
|
|
@@ -17,6 +18,6 @@ export declare class SaasTenantBillingController extends SaasTenantBillingContro
|
|
|
17
18
|
private refreshVatVerification;
|
|
18
19
|
getBillingInfo(_user: User, billingModel: TenantBillingInfoModel, subscriptionModel: TenantSubscriptionModel): Promise<BillingInfoResponse>;
|
|
19
20
|
private syncStripe;
|
|
20
|
-
updateBillingInfo(user: User, body: BillingIdentityInput, billingModel: TenantBillingInfoModel, subscriptionModel: TenantSubscriptionModel): Promise<BillingInfoResponse>;
|
|
21
|
+
updateBillingInfo(ctx: RequestContext, user: User, body: BillingIdentityInput, billingModel: TenantBillingInfoModel, subscriptionModel: TenantSubscriptionModel): Promise<BillingInfoResponse>;
|
|
21
22
|
}
|
|
22
23
|
export {};
|
|
@@ -17,11 +17,13 @@ const interface_api_1 = require("@antelopejs/interface-api");
|
|
|
17
17
|
const interface_api_util_1 = require("@antelopejs/interface-api-util");
|
|
18
18
|
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
19
19
|
const guards_1 = require("@antelopejs/interface-dms/guards");
|
|
20
|
+
const request_tenant_1 = require("@antelopejs/interface-dms/request-tenant");
|
|
20
21
|
const tenant_scoped_model_1 = require("@antelopejs/interface-dms/tenant-scoped-model");
|
|
21
22
|
const db_1 = require("../../db");
|
|
22
23
|
const billing_identity_1 = require("../../workspaces/billing-identity");
|
|
23
24
|
const complimentary_1 = require("../../workspaces/complimentary");
|
|
24
25
|
const stripe_1 = require("../../stripe");
|
|
26
|
+
const utils_1 = require("../../utils");
|
|
25
27
|
const HTTP_BAD_REQUEST = 400;
|
|
26
28
|
const ANY_AUDIENCE = "any";
|
|
27
29
|
const SETTLED_VAT_STATUSES = new Set([
|
|
@@ -67,12 +69,12 @@ async function assertCustomerTypeFitsPlan(customerType, subscription) {
|
|
|
67
69
|
const plan = await (0, interface_database_decorators_1.GetModel)(db_1.PlanModel).get(subscription.planId);
|
|
68
70
|
(0, interface_api_util_1.assert)(!plan || plan.audience === ANY_AUDIENCE || plan.audience === customerType, HTTP_BAD_REQUEST, "saas.errors.plan.not_available_for_customer_type");
|
|
69
71
|
}
|
|
70
|
-
async function persistBillingInfo(model, current, values) {
|
|
71
|
-
if (
|
|
72
|
-
await model.
|
|
72
|
+
async function persistBillingInfo(model, current, tenantId, values) {
|
|
73
|
+
if (current) {
|
|
74
|
+
await model.update(current._id, values);
|
|
73
75
|
return;
|
|
74
76
|
}
|
|
75
|
-
await
|
|
77
|
+
await (0, utils_1.insertOrUpdateById)(model, tenantId, { ...values, _id: tenantId }, values);
|
|
76
78
|
}
|
|
77
79
|
class SaasTenantBillingController extends (0, interface_api_1.Controller)("/api/saas/tenant") {
|
|
78
80
|
async refreshVatVerification(info, customerId, billingModel) {
|
|
@@ -116,7 +118,7 @@ class SaasTenantBillingController extends (0, interface_api_1.Controller)("/api/
|
|
|
116
118
|
address: identity.address,
|
|
117
119
|
});
|
|
118
120
|
}
|
|
119
|
-
async updateBillingInfo(user, body, billingModel, subscriptionModel) {
|
|
121
|
+
async updateBillingInfo(ctx, user, body, billingModel, subscriptionModel) {
|
|
120
122
|
const identity = (0, billing_identity_1.parseBillingIdentity)(body);
|
|
121
123
|
const info = await billingModel.findOne();
|
|
122
124
|
const subscription = await subscriptionModel.findOne();
|
|
@@ -126,7 +128,7 @@ class SaasTenantBillingController extends (0, interface_api_1.Controller)("/api/
|
|
|
126
128
|
? await this.syncStripe(subscription.stripeCustomerId, user.name, identity)
|
|
127
129
|
: null;
|
|
128
130
|
const values = buildBillingInfoValues(identity, vatVerificationStatus);
|
|
129
|
-
await persistBillingInfo(billingModel, info, values);
|
|
131
|
+
await persistBillingInfo(billingModel, info, (0, request_tenant_1.getRequestTenantId)(ctx), values);
|
|
130
132
|
const updated = await billingModel.findOne();
|
|
131
133
|
return toResponse(updated ?? values);
|
|
132
134
|
}
|
|
@@ -144,12 +146,13 @@ __decorate([
|
|
|
144
146
|
], SaasTenantBillingController.prototype, "getBillingInfo", null);
|
|
145
147
|
__decorate([
|
|
146
148
|
(0, interface_api_1.Put)("/billing-info"),
|
|
147
|
-
__param(0, (0,
|
|
148
|
-
__param(1, (0,
|
|
149
|
-
__param(2, (0,
|
|
150
|
-
__param(3, (0, tenant_scoped_model_1.TenantScopedModel)(db_1.
|
|
149
|
+
__param(0, (0, interface_api_1.Context)()),
|
|
150
|
+
__param(1, (0, guards_1.AuthTenantOwner)({ bypassTenantAccessGate: true })),
|
|
151
|
+
__param(2, (0, interface_api_1.JSONBody)()),
|
|
152
|
+
__param(3, (0, tenant_scoped_model_1.TenantScopedModel)(db_1.TenantBillingInfoModel)),
|
|
153
|
+
__param(4, (0, tenant_scoped_model_1.TenantScopedModel)(db_1.TenantSubscriptionModel)),
|
|
151
154
|
__metadata("design:type", Function),
|
|
152
|
-
__metadata("design:paramtypes", [Function, Object, db_1.TenantBillingInfoModel,
|
|
155
|
+
__metadata("design:paramtypes", [Object, Function, Object, db_1.TenantBillingInfoModel,
|
|
153
156
|
db_1.TenantSubscriptionModel]),
|
|
154
157
|
__metadata("design:returntype", Promise)
|
|
155
158
|
], SaasTenantBillingController.prototype, "updateBillingInfo", null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenant-billing.js","sourceRoot":"","sources":["../../../src/routes/tenant/tenant-billing.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"tenant-billing.js","sourceRoot":"","sources":["../../../src/routes/tenant/tenant-billing.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6DAOmC;AACnC,uEAAwD;AACxD,6FAAqE;AACrE,6DAG0C;AAC1C,6EAA8E;AAC9E,uFAAkF;AAElF,iCASkB;AAClB,wEAM2C;AAC3C,kEAA6E;AAC7E,yCAMsB;AACtB,uCAAiD;AAEjD,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAC7B,MAAM,YAAY,GAAG,KAAK,CAAC;AAC3B,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAAwB;IAC1D,UAAU;IACV,YAAY;CACb,CAAC,CAAC;AAoBH,MAAM,kBAAkB,GAAsB;IAC5C,YAAY,EAAE,IAAI;IAClB,WAAW,EAAE,IAAI;IACjB,SAAS,EAAE,IAAI;IACf,qBAAqB,EAAE,IAAI;IAC3B,YAAY,EAAE,IAAI;IAClB,OAAO,EAAE,IAAI;CACd,CAAC;AAEF,SAAS,UAAU,CAAC,IAAuB;IACzC,OAAO;QACL,YAAY,EAAE,IAAI,CAAC,YAAY;QAC/B,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,SAAS,EAAE,IAAI,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UAAU,CACnB,YAAY,CAAC,gBAAgB,EAC7B,IAAI,CAAC,IAAI,EACT,QAAQ,CACT;YACH,CAAC,CAAC,IAAI,CAAC;QACX,MAAM,MAAM,GAAG,sBAAsB,CAAC,QAAQ,EAAE,qBAAqB,CAAC,CAAC;QACvE,MAAM,kBAAkB,CACtB,YAAY,EACZ,IAAI,EACJ,IAAA,mCAAkB,EAAC,GAAG,CAAC,EACvB,MAAM,CACP,CAAC;QACF,MAAM,OAAO,GAAG,MAAM,YAAY,CAAC,OAAO,EAAE,CAAC;QAC7C,OAAO,UAAU,CAAC,OAAO,IAAI,MAAM,CAAC,CAAC;IACvC,CAAC;CACF;AAxGD,kEAwGC;AAxEO;IADL,IAAA,mBAAG,EAAC,eAAe,CAAC;IAElB,WAAA,IAAA,yBAAgB,EAAC,EAAE,sBAAsB,EAAE,IAAI,EAAE,CAAC,CAAA;IAClD,WAAA,IAAA,uCAAiB,EAAC,2BAAsB,CAAC,CAAA;IAEzC,WAAA,IAAA,uCAAiB,EAAC,4BAAuB,CAAC,CAAA;;+CAD7B,2BAAsB;QAEjB,4BAAuB;;iEAa3C;AAsBK;IADL,IAAA,mBAAG,EAAC,eAAe,CAAC;IAElB,WAAA,IAAA,uBAAO,GAAE,CAAA;IACT,WAAA,IAAA,wBAAe,EAAC,EAAE,sBAAsB,EAAE,IAAI,EAAE,CAAC,CAAA;IACjD,WAAA,IAAA,wBAAQ,GAAE,CAAA;IACV,WAAA,IAAA,uCAAiB,EAAC,2BAAsB,CAAC,CAAA;IAEzC,WAAA,IAAA,uCAAiB,EAAC,4BAAuB,CAAC,CAAA;;+DAD7B,2BAAsB;QAEjB,4BAAuB;;oEAwB3C"}
|
|
@@ -274,20 +274,8 @@ function resolveVatFields(existing, isBusiness, snapshot) {
|
|
|
274
274
|
: null,
|
|
275
275
|
};
|
|
276
276
|
}
|
|
277
|
-
async function
|
|
278
|
-
const
|
|
279
|
-
const chargeId = (0, webhook_shared_1.asCustomerId)(refund.charge);
|
|
280
|
-
if (!chargeId)
|
|
281
|
-
return;
|
|
282
|
-
const stripe = (0, client_1.getStripeClient)();
|
|
283
|
-
const charge = await stripe.charges.retrieve(chargeId);
|
|
284
|
-
const customerId = (0, webhook_shared_1.asCustomerId)(charge.customer);
|
|
285
|
-
if (!customerId)
|
|
286
|
-
return;
|
|
287
|
-
const tenant = await (0, webhook_shared_1.findTenantByCustomerId)(customerId);
|
|
288
|
-
if (!tenant)
|
|
289
|
-
return;
|
|
290
|
-
const refundModel = (0, interface_database_decorators_1.GetModel)(db_1.RefundModel, tenant._id);
|
|
277
|
+
async function upsertRefund(refund, tenantId) {
|
|
278
|
+
const refundModel = (0, interface_database_decorators_1.GetModel)(db_1.RefundModel, tenantId);
|
|
291
279
|
const existing = await refundModel.findOneByStripeRefund(refund.id);
|
|
292
280
|
const payload = {
|
|
293
281
|
creditNoteId: existing?.creditNoteId ?? "",
|
|
@@ -300,13 +288,24 @@ async function handleChargeRefundUpdated(event) {
|
|
|
300
288
|
};
|
|
301
289
|
if (existing) {
|
|
302
290
|
await refundModel.update(existing._id, payload);
|
|
291
|
+
return;
|
|
303
292
|
}
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
293
|
+
await (0, utils_1.insertOrUpdateById)(refundModel, refund.id, { ...payload, _id: refund.id, createdAt: new Date() }, payload);
|
|
294
|
+
}
|
|
295
|
+
async function handleChargeRefundUpdated(event) {
|
|
296
|
+
const refund = event.data.object;
|
|
297
|
+
const chargeId = (0, webhook_shared_1.asCustomerId)(refund.charge);
|
|
298
|
+
if (!chargeId)
|
|
299
|
+
return;
|
|
300
|
+
const stripe = (0, client_1.getStripeClient)();
|
|
301
|
+
const charge = await stripe.charges.retrieve(chargeId);
|
|
302
|
+
const customerId = (0, webhook_shared_1.asCustomerId)(charge.customer);
|
|
303
|
+
if (!customerId)
|
|
304
|
+
return;
|
|
305
|
+
const tenant = await (0, webhook_shared_1.findTenantByCustomerId)(customerId);
|
|
306
|
+
if (!tenant)
|
|
307
|
+
return;
|
|
308
|
+
await upsertRefund(refund, tenant._id);
|
|
310
309
|
if (refund.status === "succeeded") {
|
|
311
310
|
await (0, notifications_1.notifyTenantOwners)(tenant._id, notifications_1.refundProcessedSubject, {
|
|
312
311
|
icon: REFUND_ICON,
|