@pvh-afl/graphql 1.2.18 → 1.2.19
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/dist/customer/customer.resolver.d.ts +3 -1
- package/dist/customer/customer.resolver.d.ts.map +1 -1
- package/dist/customer/customer.resolver.js +51 -0
- package/dist/customer/customer.resolver.js.map +1 -1
- package/dist/customer/customer.service.d.ts +28 -1
- package/dist/customer/customer.service.d.ts.map +1 -1
- package/dist/customer/customer.service.js +122 -0
- package/dist/customer/customer.service.js.map +1 -1
- package/dist/customer/customer.types.d.ts +16 -0
- package/dist/customer/customer.types.d.ts.map +1 -1
- package/dist/customer/customer.types.js +93 -1
- package/dist/customer/customer.types.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AuthUser } from '@pvh-afl/core';
|
|
2
2
|
import { CustomerService } from './customer.service';
|
|
3
|
-
import { Customer, CustomerAccessTokenRenewResult, CustomerLoginResult, CustomerUpdateInput } from './customer.types';
|
|
3
|
+
import { Customer, CustomerAccessTokenRenewResult, CustomerActivateResult, CustomerDeactivateInput, CustomerDeactivateResult, CustomerLoginResult, CustomerUpdateInput } from './customer.types';
|
|
4
4
|
interface GqlContext {
|
|
5
5
|
req: {
|
|
6
6
|
brand: string;
|
|
@@ -14,6 +14,8 @@ export declare class CustomerResolver {
|
|
|
14
14
|
customerLogin(ctx: GqlContext, email: string, password: string): Promise<CustomerLoginResult>;
|
|
15
15
|
customerAccessTokenRenew(ctx: GqlContext, customerAccessToken: string): Promise<CustomerAccessTokenRenewResult>;
|
|
16
16
|
customerUpdate(ctx: GqlContext, user: AuthUser, input: CustomerUpdateInput): Promise<Customer>;
|
|
17
|
+
customerDeactivate(ctx: GqlContext, user: AuthUser, input?: CustomerDeactivateInput): Promise<CustomerDeactivateResult>;
|
|
18
|
+
customerActivate(ctx: GqlContext, user: AuthUser): Promise<CustomerActivateResult>;
|
|
17
19
|
}
|
|
18
20
|
export {};
|
|
19
21
|
//# sourceMappingURL=customer.resolver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customer.resolver.d.ts","sourceRoot":"","sources":["../../src/customer/customer.resolver.ts"],"names":[],"mappings":"AAEA,OAAO,EAA0C,QAAQ,EAAE,MAAM,eAAe,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,8BAA8B,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"customer.resolver.d.ts","sourceRoot":"","sources":["../../src/customer/customer.resolver.ts"],"names":[],"mappings":"AAEA,OAAO,EAA0C,QAAQ,EAAE,MAAM,eAAe,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,8BAA8B,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEjM,UAAU,UAAU;IAClB,GAAG,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qBACa,gBAAgB;IACf,OAAO,CAAC,QAAQ,CAAC,eAAe;gBAAf,eAAe,EAAE,eAAe;IAiBvD,QAAQ,CACD,GAAG,EAAE,UAAU,EAK1B,mBAAmB,EAAE,MAAM,GAC1B,OAAO,CAAC,QAAQ,CAAC;IAkBd,aAAa,CACN,GAAG,EAAE,UAAU,EAE1B,KAAK,EAAE,MAAM,EAEb,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,mBAAmB,CAAC;IAezB,wBAAwB,CACjB,GAAG,EAAE,UAAU,EAK1B,mBAAmB,EAAE,MAAM,GAC1B,OAAO,CAAC,8BAA8B,CAAC;IAmBpC,cAAc,CACP,GAAG,EAAE,UAAU,EACX,IAAI,EAAE,QAAQ,EAK7B,KAAK,EAAE,mBAAmB,GACzB,OAAO,CAAC,QAAQ,CAAC;IAoBd,kBAAkB,CACX,GAAG,EAAE,UAAU,EACX,IAAI,EAAE,QAAQ,EAM7B,KAAK,CAAC,EAAE,uBAAuB,GAC9B,OAAO,CAAC,wBAAwB,CAAC;IAkB9B,gBAAgB,CACT,GAAG,EAAE,UAAU,EACX,IAAI,EAAE,QAAQ,GAC5B,OAAO,CAAC,sBAAsB,CAAC;CAInC"}
|
|
@@ -28,6 +28,14 @@ let CustomerResolver = class CustomerResolver {
|
|
|
28
28
|
const brand = ctx.brand ?? ctx.req.brand;
|
|
29
29
|
return this.customerService.updateProfile(brand, user.customerId, input);
|
|
30
30
|
}
|
|
31
|
+
async customerDeactivate(ctx, user, input) {
|
|
32
|
+
const brand = ctx.brand ?? ctx.req.brand;
|
|
33
|
+
return this.customerService.deactivateAccount(brand, user.customerId, input ?? {});
|
|
34
|
+
}
|
|
35
|
+
async customerActivate(ctx, user) {
|
|
36
|
+
const brand = ctx.brand ?? ctx.req.brand;
|
|
37
|
+
return this.customerService.activateAccount(brand, user.customerId);
|
|
38
|
+
}
|
|
31
39
|
};
|
|
32
40
|
exports.CustomerResolver = CustomerResolver;
|
|
33
41
|
tslib_1.__decorate([
|
|
@@ -121,6 +129,49 @@ Returns the updated customer.`,
|
|
|
121
129
|
tslib_1.__metadata("design:paramtypes", [Object, Object, customer_types_1.CustomerUpdateInput]),
|
|
122
130
|
tslib_1.__metadata("design:returntype", Promise)
|
|
123
131
|
], CustomerResolver.prototype, "customerUpdate", null);
|
|
132
|
+
tslib_1.__decorate([
|
|
133
|
+
(0, graphql_1.Mutation)(() => customer_types_1.CustomerDeactivateResult, {
|
|
134
|
+
description: `Request deletion of the logged-in customer's account, starting the grace period.
|
|
135
|
+
|
|
136
|
+
Send the customer's first-party token as \`Authorization: Bearer <jwt>\`; the
|
|
137
|
+
customer is taken from the verified token, never from the request body.
|
|
138
|
+
|
|
139
|
+
Stamps \`deactivatedAt\` server-side and stores the optional \`reason\`. The client
|
|
140
|
+
derives the remaining grace period from \`deactivatedAt\`.
|
|
141
|
+
|
|
142
|
+
Fails with \`ACCOUNT_ALREADY_DEACTIVATED\` if a request is already pending; the
|
|
143
|
+
original date and reason are left untouched. Does not prevent sign-in — Shopify
|
|
144
|
+
cannot disable a customer, so clients decide what to show from
|
|
145
|
+
\`isDeactivated\`.`,
|
|
146
|
+
}),
|
|
147
|
+
(0, common_1.UseGuards)(core_1.TenantGuard, core_1.JwtAuthGuard),
|
|
148
|
+
tslib_1.__param(0, (0, graphql_1.Context)()),
|
|
149
|
+
tslib_1.__param(1, (0, core_1.CurrentUser)()),
|
|
150
|
+
tslib_1.__param(2, (0, graphql_1.Args)('input', {
|
|
151
|
+
type: () => customer_types_1.CustomerDeactivateInput,
|
|
152
|
+
nullable: true,
|
|
153
|
+
description: 'Optional reason for leaving',
|
|
154
|
+
})),
|
|
155
|
+
tslib_1.__metadata("design:type", Function),
|
|
156
|
+
tslib_1.__metadata("design:paramtypes", [Object, Object, customer_types_1.CustomerDeactivateInput]),
|
|
157
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
158
|
+
], CustomerResolver.prototype, "customerDeactivate", null);
|
|
159
|
+
tslib_1.__decorate([
|
|
160
|
+
(0, graphql_1.Mutation)(() => customer_types_1.CustomerActivateResult, {
|
|
161
|
+
description: `Cancel a pending account-deletion request, restoring the account.
|
|
162
|
+
|
|
163
|
+
Authenticated as customerDeactivate — the customer comes from the verified JWT.
|
|
164
|
+
|
|
165
|
+
Clears the flag, the date and the stored reason. Fails with
|
|
166
|
+
\`ACCOUNT_ALREADY_ACTIVE\` if no request is pending.`,
|
|
167
|
+
}),
|
|
168
|
+
(0, common_1.UseGuards)(core_1.TenantGuard, core_1.JwtAuthGuard),
|
|
169
|
+
tslib_1.__param(0, (0, graphql_1.Context)()),
|
|
170
|
+
tslib_1.__param(1, (0, core_1.CurrentUser)()),
|
|
171
|
+
tslib_1.__metadata("design:type", Function),
|
|
172
|
+
tslib_1.__metadata("design:paramtypes", [Object, Object]),
|
|
173
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
174
|
+
], CustomerResolver.prototype, "customerActivate", null);
|
|
124
175
|
exports.CustomerResolver = CustomerResolver = tslib_1.__decorate([
|
|
125
176
|
(0, graphql_1.Resolver)(),
|
|
126
177
|
tslib_1.__metadata("design:paramtypes", [customer_service_1.CustomerService])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customer.resolver.js","sourceRoot":"","sources":["../../src/customer/customer.resolver.ts"],"names":[],"mappings":";;;;AAAA,6CAA2E;AAC3E,2CAA2C;AAC3C,wCAAiF;AACjF,yDAAqD;AACrD,
|
|
1
|
+
{"version":3,"file":"customer.resolver.js","sourceRoot":"","sources":["../../src/customer/customer.resolver.ts"],"names":[],"mappings":";;;;AAAA,6CAA2E;AAC3E,2CAA2C;AAC3C,wCAAiF;AACjF,yDAAqD;AACrD,qDAAiM;AAQ1L,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IACE;IAA7B,YAA6B,eAAgC;QAAhC,oBAAe,GAAf,eAAe,CAAiB;IAAG,CAAC;IAiB3D,AAAN,KAAK,CAAC,QAAQ,CACD,GAAe,EAK1B,mBAA2B;QAE3B,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC;QACzC,OAAO,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,KAAK,EAAE,mBAAmB,CAAC,CAAC;IACrE,CAAC;IAeK,AAAN,KAAK,CAAC,aAAa,CACN,GAAe,EAE1B,KAAa,EAEb,QAAgB;QAEhB,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC;QACzC,OAAO,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;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EAAC,OAAO,EAAE;QACb,IAAI,EAAE,GAAG,EAAE,CAAC,oCAAmB;QAC/B,WAAW,EAAE,0BAA0B;KACxC,CAAC,CAAA;;6DACK,oCAAmB;;sDAI3B;AAiBK;IAfL,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,yCAAwB,EAAE;QACxC,WAAW,EAAE;;;;;;;;;;;mBAWE;KAChB,CAAC;IACD,IAAA,kBAAS,EAAC,kBAAW,EAAE,mBAAY,CAAC;IAElC,mBAAA,IAAA,iBAAO,GAAE,CAAA;IACT,mBAAA,IAAA,kBAAW,GAAE,CAAA;IACb,mBAAA,IAAA,cAAI,EAAC,OAAO,EAAE;QACb,IAAI,EAAE,GAAG,EAAE,CAAC,wCAAuB;QACnC,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,6BAA6B;KAC3C,CAAC,CAAA;;6DACM,wCAAuB;;0DAQhC;AAWK;IATL,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,uCAAsB,EAAE;QACtC,WAAW,EAAE;;;;;qDAKoC;KAClD,CAAC;IACD,IAAA,kBAAS,EAAC,kBAAW,EAAE,mBAAY,CAAC;IAElC,mBAAA,IAAA,iBAAO,GAAE,CAAA;IACT,mBAAA,IAAA,kBAAW,GAAE,CAAA;;;;wDAIf;2BAvJU,gBAAgB;IAD5B,IAAA,kBAAQ,GAAE;6CAEqC,kCAAe;GADlD,gBAAgB,CAwJ5B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IntegrationFactory, ShopifyAdminService, CapillaryCouponService } from '@pvh-afl/core';
|
|
2
|
-
import { Customer, CustomerAccessTokenRenewResult, CustomerLoginResult, CustomerUpdateInput } from './customer.types';
|
|
2
|
+
import { Customer, CustomerAccessTokenRenewResult, CustomerActivateResult, CustomerDeactivateInput, CustomerDeactivateResult, CustomerLoginResult, CustomerUpdateInput } from './customer.types';
|
|
3
3
|
export declare class CustomerService {
|
|
4
4
|
private readonly integrationFactory;
|
|
5
5
|
private readonly adminService;
|
|
@@ -76,5 +76,32 @@ export declare class CustomerService {
|
|
|
76
76
|
* facts metafields via the Admin API, then re-read the persisted state.
|
|
77
77
|
*/
|
|
78
78
|
updateProfile(brand: string, customerId: string, input: CustomerUpdateInput): Promise<Customer>;
|
|
79
|
+
/**
|
|
80
|
+
* Flag the customer's account for deletion, starting the grace period.
|
|
81
|
+
*
|
|
82
|
+
* The customer is identified by the `customerId` from their verified
|
|
83
|
+
* first-party JWT (never from client input), so a caller can only ever
|
|
84
|
+
* deactivate their own account.
|
|
85
|
+
*
|
|
86
|
+
* The timestamp is generated here rather than accepted from the client: a
|
|
87
|
+
* client-supplied date could extend the grace period indefinitely or backdate
|
|
88
|
+
* it to force an early purge.
|
|
89
|
+
*
|
|
90
|
+
* Calling this again while a request is already pending is rejected with
|
|
91
|
+
* `ACCOUNT_ALREADY_DEACTIVATED` rather than silently succeeding, so a
|
|
92
|
+
* double tap is visible to the client instead of looking like a fresh
|
|
93
|
+
* request. Nothing is rewritten in that case: the original `deactivatedAt`
|
|
94
|
+
* and `reason` stand, so the countdown cannot be restarted.
|
|
95
|
+
*/
|
|
96
|
+
deactivateAccount(brand: string, customerId: string, input: CustomerDeactivateInput): Promise<CustomerDeactivateResult>;
|
|
97
|
+
/**
|
|
98
|
+
* Clear the account-deletion request, restoring the account.
|
|
99
|
+
*
|
|
100
|
+
* Identity comes from the verified JWT, as with deactivateAccount. Restoring
|
|
101
|
+
* an account with no pending request is rejected with
|
|
102
|
+
* `ACCOUNT_ALREADY_ACTIVE`, so a repeat tap is visible to the client rather
|
|
103
|
+
* than reporting a restore that restored nothing.
|
|
104
|
+
*/
|
|
105
|
+
activateAccount(brand: string, customerId: string): Promise<CustomerActivateResult>;
|
|
79
106
|
}
|
|
80
107
|
//# sourceMappingURL=customer.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customer.service.d.ts","sourceRoot":"","sources":["../../src/customer/customer.service.ts"],"names":[],"mappings":"
|
|
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iBAAiB,CACrB,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,uBAAuB,GAC7B,OAAO,CAAC,wBAAwB,CAAC;IA6EpC;;;;;;;OAOG;IACG,eAAe,CACnB,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,sBAAsB,CAAC;CAuCnC"}
|
|
@@ -5,6 +5,20 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const common_1 = require("@nestjs/common");
|
|
6
6
|
const core_1 = require("@pvh-afl/core");
|
|
7
7
|
const customer_types_1 = require("./customer.types");
|
|
8
|
+
/**
|
|
9
|
+
* Where the account-deletion state lives on the Shopify customer.
|
|
10
|
+
*
|
|
11
|
+
* The JSON metafield is the source of truth (one atomic write for the flag, the
|
|
12
|
+
* timestamp and the reason). The tag carries no data — it exists only so these
|
|
13
|
+
* customers can be found: `customers(query: "tag:Deactivated")`. Metafields
|
|
14
|
+
* are not reliably searchable, so without the tag the eventual purge job would
|
|
15
|
+
* have to scan every customer in the store.
|
|
16
|
+
*/
|
|
17
|
+
const DEACTIVATION_TAG = 'Deactivated';
|
|
18
|
+
const FACTS_NAMESPACE = 'facts';
|
|
19
|
+
const DEACTIVATION_KEY = 'account_deactivation';
|
|
20
|
+
/** Matches the 400-char counter on the app's "Reason for leaving" field. */
|
|
21
|
+
const MAX_REASON_LENGTH = 400;
|
|
8
22
|
let CustomerService = class CustomerService {
|
|
9
23
|
integrationFactory;
|
|
10
24
|
adminService;
|
|
@@ -45,6 +59,9 @@ let CustomerService = class CustomerService {
|
|
|
45
59
|
displayName: customer.displayName,
|
|
46
60
|
gender: this.toGender(facts.gender),
|
|
47
61
|
birthDate: facts.birthDate,
|
|
62
|
+
isDeactivated: facts.accountDeactivation?.isDeactivated === true,
|
|
63
|
+
deactivatedAt: facts.accountDeactivation?.deactivatedAt ?? undefined,
|
|
64
|
+
deactivationReason: facts.accountDeactivation?.reason ?? undefined,
|
|
48
65
|
};
|
|
49
66
|
}
|
|
50
67
|
/**
|
|
@@ -249,6 +266,111 @@ let CustomerService = class CustomerService {
|
|
|
249
266
|
core_1.logger.info('Customer profile updated', { brand, customerId });
|
|
250
267
|
return this.toCustomer(fresh, updatedFacts);
|
|
251
268
|
}
|
|
269
|
+
/**
|
|
270
|
+
* Flag the customer's account for deletion, starting the grace period.
|
|
271
|
+
*
|
|
272
|
+
* The customer is identified by the `customerId` from their verified
|
|
273
|
+
* first-party JWT (never from client input), so a caller can only ever
|
|
274
|
+
* deactivate their own account.
|
|
275
|
+
*
|
|
276
|
+
* The timestamp is generated here rather than accepted from the client: a
|
|
277
|
+
* client-supplied date could extend the grace period indefinitely or backdate
|
|
278
|
+
* it to force an early purge.
|
|
279
|
+
*
|
|
280
|
+
* Calling this again while a request is already pending is rejected with
|
|
281
|
+
* `ACCOUNT_ALREADY_DEACTIVATED` rather than silently succeeding, so a
|
|
282
|
+
* double tap is visible to the client instead of looking like a fresh
|
|
283
|
+
* request. Nothing is rewritten in that case: the original `deactivatedAt`
|
|
284
|
+
* and `reason` stand, so the countdown cannot be restarted.
|
|
285
|
+
*/
|
|
286
|
+
async deactivateAccount(brand, customerId, input) {
|
|
287
|
+
// Normalise once: a blank or whitespace-only reason is the same as none, so
|
|
288
|
+
// the stored metafield and the returned field agree (neither carries '').
|
|
289
|
+
const reason = input.reason?.trim() || undefined;
|
|
290
|
+
if (reason && reason.length > MAX_REASON_LENGTH) {
|
|
291
|
+
throw new common_1.BadRequestException(`reason must be at most ${MAX_REASON_LENGTH} characters`);
|
|
292
|
+
}
|
|
293
|
+
const facts = await this.adminService.getCustomerFacts(brand, customerId);
|
|
294
|
+
// Already pending: reject rather than silently returning the stored state.
|
|
295
|
+
// The request is NOT re-recorded — neither deactivatedAt nor reason moves,
|
|
296
|
+
// so a repeat tap cannot restart the countdown or overwrite the original
|
|
297
|
+
// answer. The client reads deactivatedAt from the customer query.
|
|
298
|
+
if (facts.accountDeactivation?.isDeactivated === true) {
|
|
299
|
+
throw new common_1.BadRequestException({
|
|
300
|
+
code: 'ACCOUNT_ALREADY_DEACTIVATED',
|
|
301
|
+
message: 'Account is already deactivated',
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
// Write the metafield (the source of truth) before the tag: interrupted
|
|
305
|
+
// between the two, a missing tag only leaves the purge index incomplete,
|
|
306
|
+
// whereas a tag with no metafield would read as active anyway.
|
|
307
|
+
const state = {
|
|
308
|
+
isDeactivated: true,
|
|
309
|
+
deactivatedAt: new Date().toISOString(),
|
|
310
|
+
...(reason ? { reason } : {}),
|
|
311
|
+
};
|
|
312
|
+
const written = await this.adminService.setCustomerMetafieldJson(brand, customerId, FACTS_NAMESPACE, DEACTIVATION_KEY, state);
|
|
313
|
+
if (!written.success) {
|
|
314
|
+
throw new Error(written.error ?? 'Failed to deactivate account');
|
|
315
|
+
}
|
|
316
|
+
const tagged = await this.adminService.updateCustomerTags(brand, customerId, 'add', [DEACTIVATION_TAG]);
|
|
317
|
+
if (!tagged.success) {
|
|
318
|
+
// The account IS deactivated (the metafield says so) — only the lookup
|
|
319
|
+
// index is missing. Log rather than fail, so the client is not told the
|
|
320
|
+
// request failed when it did not. The tag is re-added by the next
|
|
321
|
+
// successful deactivation, or can be backfilled from the metafield.
|
|
322
|
+
core_1.logger.error('Account deactivated but tag not applied', {
|
|
323
|
+
brand,
|
|
324
|
+
customerId,
|
|
325
|
+
error: tagged.error,
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
core_1.logger.info('Account deactivation requested', {
|
|
329
|
+
brand,
|
|
330
|
+
customerId,
|
|
331
|
+
hasReason: Boolean(reason),
|
|
332
|
+
});
|
|
333
|
+
// Everything returned here is what we just wrote, so no read-back is
|
|
334
|
+
// needed — the client gets the persisted values without another Admin call.
|
|
335
|
+
return {
|
|
336
|
+
message: 'Account deactivated successfully',
|
|
337
|
+
isDeactivated: true,
|
|
338
|
+
deactivatedAt: state.deactivatedAt,
|
|
339
|
+
deactivationReason: reason,
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Clear the account-deletion request, restoring the account.
|
|
344
|
+
*
|
|
345
|
+
* Identity comes from the verified JWT, as with deactivateAccount. Restoring
|
|
346
|
+
* an account with no pending request is rejected with
|
|
347
|
+
* `ACCOUNT_ALREADY_ACTIVE`, so a repeat tap is visible to the client rather
|
|
348
|
+
* than reporting a restore that restored nothing.
|
|
349
|
+
*/
|
|
350
|
+
async activateAccount(brand, customerId) {
|
|
351
|
+
// Nothing pending: reject rather than reporting a restore that restored
|
|
352
|
+
// nothing, mirroring customerDeactivate.
|
|
353
|
+
const facts = await this.adminService.getCustomerFacts(brand, customerId);
|
|
354
|
+
if (facts.accountDeactivation?.isDeactivated !== true) {
|
|
355
|
+
throw new common_1.BadRequestException({
|
|
356
|
+
code: 'ACCOUNT_ALREADY_ACTIVE',
|
|
357
|
+
message: 'Account is already active',
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
// Remove the tag first, then the metafield: the reverse of deactivation, so
|
|
361
|
+
// an interruption leaves the metafield (source of truth) as the last thing
|
|
362
|
+
// standing rather than an untagged, still-deactivated account.
|
|
363
|
+
const untagged = await this.adminService.updateCustomerTags(brand, customerId, 'remove', [DEACTIVATION_TAG]);
|
|
364
|
+
if (!untagged.success) {
|
|
365
|
+
throw new Error(untagged.error ?? 'Failed to restore account');
|
|
366
|
+
}
|
|
367
|
+
const cleared = await this.adminService.deleteCustomerMetafield(brand, customerId, FACTS_NAMESPACE, DEACTIVATION_KEY);
|
|
368
|
+
if (!cleared.success) {
|
|
369
|
+
throw new Error(cleared.error ?? 'Failed to restore account');
|
|
370
|
+
}
|
|
371
|
+
core_1.logger.info('Account restored', { brand, customerId });
|
|
372
|
+
return { message: 'Account activated successfully', isActivated: true };
|
|
373
|
+
}
|
|
252
374
|
};
|
|
253
375
|
exports.CustomerService = CustomerService;
|
|
254
376
|
exports.CustomerService = CustomerService = tslib_1.__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customer.service.js","sourceRoot":"","sources":["../../src/customer/customer.service.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"customer.service.js","sourceRoot":"","sources":["../../src/customer/customer.service.ts"],"names":[],"mappings":";;;;AAAA,2CAMwB;AACxB,wCAQuB;AACvB,qDAS0B;AAE1B;;;;;;;;GAQG;AACH,MAAM,gBAAgB,GAAG,aAAa,CAAC;AACvC,MAAM,eAAe,GAAG,OAAO,CAAC;AAChC,MAAM,gBAAgB,GAAG,sBAAsB,CAAC;AAEhD,4EAA4E;AAC5E,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAGvB,IAAM,eAAe,GAArB,MAAM,eAAe;IAEP;IACA;IACA;IAHnB,YACmB,kBAAsC,EACtC,YAAiC,EACjC,gBAAwC;QAFxC,uBAAkB,GAAlB,kBAAkB,CAAoB;QACtC,iBAAY,GAAZ,YAAY,CAAqB;QACjC,qBAAgB,GAAhB,gBAAgB,CAAwB;IACxD,CAAC;IAEI,kBAAkB,CAAC,KAAa;QACtC,MAAM,QAAQ,GAAG,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;QAChE,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,IAAI,KAAK,CAAC,kDAAkD,KAAK,EAAE,CAAC,CAAC;QAC7E,CAAC;QACD,OAAO,QAAuC,CAAC;IACjD,CAAC;IAED;;;OAGG;IACK,QAAQ,CAAC,KAAc;QAC7B,IAAI,KAAK,KAAK,uBAAM,CAAC,IAAI,IAAI,KAAK,KAAK,uBAAM,CAAC,MAAM,EAAE,CAAC;YACrD,OAAO,KAAe,CAAC;QACzB,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED;;;OAGG;IACK,UAAU,CAAC,QAA0B,EAAE,KAAoB;QACjE,OAAO;YACL,EAAE,EAAE,QAAQ,CAAC,EAAE;YACf,KAAK,EAAE,QAAQ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ACnB,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,IAAI,2BAA2B,CAAC,CAAC;QACjE,CAAC;QAED,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,uBAAuB,CAC7D,KAAK,EACL,UAAU,EACV,eAAe,EACf,gBAAgB,CACjB,CAAC;QACF,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,IAAI,2BAA2B,CAAC,CAAC;QAChE,CAAC;QAED,aAAM,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;QAEvD,OAAO,EAAE,OAAO,EAAE,gCAAgC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;IAC1E,CAAC;CAEF,CAAA;AAzbY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,mBAAU,GAAE;6CAG4B,yBAAkB;QACxB,0BAAmB;QACf,6BAAsB;GAJhD,eAAe,CAyb3B"}
|
|
@@ -16,6 +16,9 @@ export declare class Customer {
|
|
|
16
16
|
birthDate?: string;
|
|
17
17
|
registeredInCapillary?: boolean;
|
|
18
18
|
memberId?: string;
|
|
19
|
+
isDeactivated: boolean;
|
|
20
|
+
deactivatedAt?: string;
|
|
21
|
+
deactivationReason?: string;
|
|
19
22
|
}
|
|
20
23
|
export declare class CustomerUpdateInput {
|
|
21
24
|
firstName?: string;
|
|
@@ -23,6 +26,19 @@ export declare class CustomerUpdateInput {
|
|
|
23
26
|
gender?: Gender;
|
|
24
27
|
birthDate?: string;
|
|
25
28
|
}
|
|
29
|
+
export declare class CustomerDeactivateInput {
|
|
30
|
+
reason?: string;
|
|
31
|
+
}
|
|
32
|
+
export declare class CustomerDeactivateResult {
|
|
33
|
+
message: string;
|
|
34
|
+
isDeactivated: boolean;
|
|
35
|
+
deactivatedAt: string;
|
|
36
|
+
deactivationReason?: string;
|
|
37
|
+
}
|
|
38
|
+
export declare class CustomerActivateResult {
|
|
39
|
+
message: string;
|
|
40
|
+
isActivated: boolean;
|
|
41
|
+
}
|
|
26
42
|
export declare class CustomerLoginResult {
|
|
27
43
|
customerAccessToken: string;
|
|
28
44
|
expiresAt: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customer.types.d.ts","sourceRoot":"","sources":["../../src/customer/customer.types.ts"],"names":[],"mappings":"AAEA;;GAEG;AAEH,oBAAY,MAAM;IAChB,IAAI,SAAS;IACb,MAAM,WAAW;CAClB;AAWD,qBACa,QAAQ;IAEnB,EAAE,EAAG,MAAM,CAAC;IAGZ,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,WAAW,EAAG,MAAM,CAAC;IAMrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAOhB,SAAS,CAAC,EAAE,MAAM,CAAC;IAMnB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAMhC,QAAQ,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"customer.types.d.ts","sourceRoot":"","sources":["../../src/customer/customer.types.ts"],"names":[],"mappings":"AAEA;;GAEG;AAEH,oBAAY,MAAM;IAChB,IAAI,SAAS;IACb,MAAM,WAAW;CAClB;AAWD,qBACa,QAAQ;IAEnB,EAAE,EAAG,MAAM,CAAC;IAGZ,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,WAAW,EAAG,MAAM,CAAC;IAMrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAOhB,SAAS,CAAC,EAAE,MAAM,CAAC;IAMnB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAMhC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAMlB,aAAa,EAAG,OAAO,CAAC;IAOxB,aAAa,CAAC,EAAE,MAAM,CAAC;IAOvB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,qBACa,mBAAmB;IAE9B,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,MAAM,CAAC,EAAE,MAAM,CAAC;IAMhB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qBACa,uBAAuB;IAMlC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,qBAGa,wBAAwB;IAEnC,OAAO,EAAG,MAAM,CAAC;IAMjB,aAAa,EAAG,OAAO,CAAC;IAMxB,aAAa,EAAG,MAAM,CAAC;IAMvB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,qBAGa,sBAAsB;IAEjC,OAAO,EAAG,MAAM,CAAC;IAMjB,WAAW,EAAG,OAAO,CAAC;CACvB;AAED,qBAIa,mBAAmB;IAK9B,mBAAmB,EAAG,MAAM,CAAC;IAG7B,SAAS,EAAG,MAAM,CAAC;IAGnB,QAAQ,EAAG,QAAQ,CAAC;CACrB;AAED,qBAGa,8BAA8B;IAEzC,mBAAmB,EAAG,MAAM,CAAC;IAG7B,SAAS,EAAG,MAAM,CAAC;CACpB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CustomerAccessTokenRenewResult = exports.CustomerLoginResult = exports.CustomerUpdateInput = exports.Customer = exports.Gender = void 0;
|
|
3
|
+
exports.CustomerAccessTokenRenewResult = exports.CustomerLoginResult = exports.CustomerActivateResult = exports.CustomerDeactivateResult = exports.CustomerDeactivateInput = exports.CustomerUpdateInput = exports.Customer = exports.Gender = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const graphql_1 = require("@nestjs/graphql");
|
|
6
6
|
/**
|
|
@@ -30,6 +30,9 @@ let Customer = class Customer {
|
|
|
30
30
|
birthDate;
|
|
31
31
|
registeredInCapillary;
|
|
32
32
|
memberId;
|
|
33
|
+
isDeactivated;
|
|
34
|
+
deactivatedAt;
|
|
35
|
+
deactivationReason;
|
|
33
36
|
};
|
|
34
37
|
exports.Customer = Customer;
|
|
35
38
|
tslib_1.__decorate([
|
|
@@ -84,6 +87,26 @@ tslib_1.__decorate([
|
|
|
84
87
|
}),
|
|
85
88
|
tslib_1.__metadata("design:type", String)
|
|
86
89
|
], Customer.prototype, "memberId", void 0);
|
|
90
|
+
tslib_1.__decorate([
|
|
91
|
+
(0, graphql_1.Field)({
|
|
92
|
+
description: 'Whether the customer has requested account deletion and is inside the grace period. False when no request is pending.',
|
|
93
|
+
}),
|
|
94
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
95
|
+
], Customer.prototype, "isDeactivated", void 0);
|
|
96
|
+
tslib_1.__decorate([
|
|
97
|
+
(0, graphql_1.Field)({
|
|
98
|
+
nullable: true,
|
|
99
|
+
description: 'ISO-8601 timestamp of when deletion was requested; null when the account is active. The client derives the remaining grace period from this.',
|
|
100
|
+
}),
|
|
101
|
+
tslib_1.__metadata("design:type", String)
|
|
102
|
+
], Customer.prototype, "deactivatedAt", void 0);
|
|
103
|
+
tslib_1.__decorate([
|
|
104
|
+
(0, graphql_1.Field)({
|
|
105
|
+
nullable: true,
|
|
106
|
+
description: 'The reason the customer gave when requesting deletion. Null when the account is active or no reason was given.',
|
|
107
|
+
}),
|
|
108
|
+
tslib_1.__metadata("design:type", String)
|
|
109
|
+
], Customer.prototype, "deactivationReason", void 0);
|
|
87
110
|
exports.Customer = Customer = tslib_1.__decorate([
|
|
88
111
|
(0, graphql_1.ObjectType)({ description: 'A Shopify customer.' })
|
|
89
112
|
], Customer);
|
|
@@ -116,6 +139,75 @@ tslib_1.__decorate([
|
|
|
116
139
|
exports.CustomerUpdateInput = CustomerUpdateInput = tslib_1.__decorate([
|
|
117
140
|
(0, graphql_1.InputType)({ description: 'Fields to update on a customer profile.' })
|
|
118
141
|
], CustomerUpdateInput);
|
|
142
|
+
let CustomerDeactivateInput = class CustomerDeactivateInput {
|
|
143
|
+
reason;
|
|
144
|
+
};
|
|
145
|
+
exports.CustomerDeactivateInput = CustomerDeactivateInput;
|
|
146
|
+
tslib_1.__decorate([
|
|
147
|
+
(0, graphql_1.Field)({
|
|
148
|
+
nullable: true,
|
|
149
|
+
description: 'Optional free-text reason for leaving, max 400 characters. Returned as Customer.deactivationReason while the request is pending.',
|
|
150
|
+
}),
|
|
151
|
+
tslib_1.__metadata("design:type", String)
|
|
152
|
+
], CustomerDeactivateInput.prototype, "reason", void 0);
|
|
153
|
+
exports.CustomerDeactivateInput = CustomerDeactivateInput = tslib_1.__decorate([
|
|
154
|
+
(0, graphql_1.InputType)({ description: 'Details for an account deletion request.' })
|
|
155
|
+
], CustomerDeactivateInput);
|
|
156
|
+
let CustomerDeactivateResult = class CustomerDeactivateResult {
|
|
157
|
+
message;
|
|
158
|
+
isDeactivated;
|
|
159
|
+
deactivatedAt;
|
|
160
|
+
deactivationReason;
|
|
161
|
+
};
|
|
162
|
+
exports.CustomerDeactivateResult = CustomerDeactivateResult;
|
|
163
|
+
tslib_1.__decorate([
|
|
164
|
+
(0, graphql_1.Field)({ description: 'Human-readable confirmation of what happened.' }),
|
|
165
|
+
tslib_1.__metadata("design:type", String)
|
|
166
|
+
], CustomerDeactivateResult.prototype, "message", void 0);
|
|
167
|
+
tslib_1.__decorate([
|
|
168
|
+
(0, graphql_1.Field)({
|
|
169
|
+
description: 'True once the deletion request is recorded. Always true on success — a request that changes nothing returns ACCOUNT_ALREADY_DEACTIVATED instead.',
|
|
170
|
+
}),
|
|
171
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
172
|
+
], CustomerDeactivateResult.prototype, "isDeactivated", void 0);
|
|
173
|
+
tslib_1.__decorate([
|
|
174
|
+
(0, graphql_1.Field)({
|
|
175
|
+
description: 'ISO-8601 timestamp just recorded against the customer. The client derives the remaining grace period from this.',
|
|
176
|
+
}),
|
|
177
|
+
tslib_1.__metadata("design:type", String)
|
|
178
|
+
], CustomerDeactivateResult.prototype, "deactivatedAt", void 0);
|
|
179
|
+
tslib_1.__decorate([
|
|
180
|
+
(0, graphql_1.Field)({
|
|
181
|
+
nullable: true,
|
|
182
|
+
description: 'The reason stored with the request, when one was given.',
|
|
183
|
+
}),
|
|
184
|
+
tslib_1.__metadata("design:type", String)
|
|
185
|
+
], CustomerDeactivateResult.prototype, "deactivationReason", void 0);
|
|
186
|
+
exports.CustomerDeactivateResult = CustomerDeactivateResult = tslib_1.__decorate([
|
|
187
|
+
(0, graphql_1.ObjectType)({
|
|
188
|
+
description: 'Result of requesting account deletion.',
|
|
189
|
+
})
|
|
190
|
+
], CustomerDeactivateResult);
|
|
191
|
+
let CustomerActivateResult = class CustomerActivateResult {
|
|
192
|
+
message;
|
|
193
|
+
isActivated;
|
|
194
|
+
};
|
|
195
|
+
exports.CustomerActivateResult = CustomerActivateResult;
|
|
196
|
+
tslib_1.__decorate([
|
|
197
|
+
(0, graphql_1.Field)({ description: 'Human-readable confirmation of what happened.' }),
|
|
198
|
+
tslib_1.__metadata("design:type", String)
|
|
199
|
+
], CustomerActivateResult.prototype, "message", void 0);
|
|
200
|
+
tslib_1.__decorate([
|
|
201
|
+
(0, graphql_1.Field)({
|
|
202
|
+
description: 'True once the account is restored. Always true on success — restoring an account with nothing pending returns ACCOUNT_ALREADY_ACTIVE instead.',
|
|
203
|
+
}),
|
|
204
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
205
|
+
], CustomerActivateResult.prototype, "isActivated", void 0);
|
|
206
|
+
exports.CustomerActivateResult = CustomerActivateResult = tslib_1.__decorate([
|
|
207
|
+
(0, graphql_1.ObjectType)({
|
|
208
|
+
description: 'Result of cancelling a pending account-deletion request.',
|
|
209
|
+
})
|
|
210
|
+
], CustomerActivateResult);
|
|
119
211
|
let CustomerLoginResult = class CustomerLoginResult {
|
|
120
212
|
customerAccessToken;
|
|
121
213
|
expiresAt;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customer.types.js","sourceRoot":"","sources":["../../src/customer/customer.types.ts"],"names":[],"mappings":";;;;AAAA,6CAAiF;AAEjF;;GAEG;AAEH,IAAY,MAGX;AAHD,WAAY,MAAM;IAChB,uBAAa,CAAA;IACb,2BAAiB,CAAA;AACnB,CAAC,EAHW,MAAM,sBAAN,MAAM,QAGjB;AAED,IAAA,0BAAgB,EAAC,MAAM,EAAE;IACvB,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,yDAAyD;IACtE,SAAS,EAAE;QACT,IAAI,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE;QAC7B,MAAM,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE;KAClC;CACF,CAAC,CAAC;AAGI,IAAM,QAAQ,GAAd,MAAM,QAAQ;IAEnB,EAAE,CAAU;IAGZ,KAAK,CAAU;IAGf,SAAS,CAAU;IAGnB,QAAQ,CAAU;IAGlB,KAAK,CAAU;IAGf,WAAW,CAAU;IAMrB,MAAM,CAAU;IAOhB,SAAS,CAAU;IAMnB,qBAAqB,CAAW;IAMhC,QAAQ,CAAU;
|
|
1
|
+
{"version":3,"file":"customer.types.js","sourceRoot":"","sources":["../../src/customer/customer.types.ts"],"names":[],"mappings":";;;;AAAA,6CAAiF;AAEjF;;GAEG;AAEH,IAAY,MAGX;AAHD,WAAY,MAAM;IAChB,uBAAa,CAAA;IACb,2BAAiB,CAAA;AACnB,CAAC,EAHW,MAAM,sBAAN,MAAM,QAGjB;AAED,IAAA,0BAAgB,EAAC,MAAM,EAAE;IACvB,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,yDAAyD;IACtE,SAAS,EAAE;QACT,IAAI,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE;QAC7B,M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