Skip to content

Commit 0d0b3d3

Browse files
authored
fix: add show feedback option (#3435)
1 parent 63a3a60 commit 0d0b3d3

7 files changed

Lines changed: 10 additions & 1 deletion

File tree

__tests__/fixture/paddle/subscription.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export const recruiterSubscriptionCreated = {
3434
batch_size: '100',
3535
reminders: 'true',
3636
show_slack: 'true',
37+
show_feedback: 'true',
3738
},
3839
},
3940
quantity: 1,

__tests__/routes/webhooks/paddle.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,7 @@ describe('recruiter product', () => {
820820
plan: 'pri_recruiter_monthly',
821821
reminders: true,
822822
showSlack: true,
823+
showFeedback: true,
823824
});
824825
});
825826

src/common/paddle/recruiter/processing.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ export const createOpportunitySubscription = async ({
142142
plan: price.id,
143143
reminders: priceCustomData.reminders,
144144
showSlack: priceCustomData.show_slack,
145+
showFeedback: priceCustomData.show_feedback,
145146
}),
146147
},
147148
);

src/common/paddle/recruiter/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ export const recruiterPaddlePricingCustomDataSchema = z.object({
1010
batch_size: z.coerce.number().nonnegative().max(10_000),
1111
reminders: zCoerceStringBoolean.nullish(),
1212
show_slack: zCoerceStringBoolean.nullish(),
13+
show_feedback: zCoerceStringBoolean.nullish(),
1314
});

src/entity/opportunities/Opportunity.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,12 @@ export type OpportunityFlags = Partial<{
3333
plan: string;
3434
reminders: boolean | null;
3535
showSlack: boolean | null;
36+
showFeedback: boolean | null;
3637
}>;
3738

3839
export type OpportunityFlagsPublic = Pick<
3940
OpportunityFlags,
40-
'batchSize' | 'plan'
41+
'batchSize' | 'plan' | 'showSlack' | 'showFeedback'
4142
>;
4243

4344
@Entity()

src/graphorm/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1713,6 +1713,8 @@ const obj = new GraphORM({
17131713
return {
17141714
batchSize: value?.batchSize ?? opportunityMatchBatchSize,
17151715
plan: value?.plan,
1716+
showSlack: value?.showSlack ?? false,
1717+
showFeedback: value?.showFeedback ?? false,
17161718
};
17171719
},
17181720
},

src/schema/opportunity.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,8 @@ export const typeDefs = /* GraphQL */ `
290290
type OpportunityFlagsPublic {
291291
batchSize: Int
292292
plan: String
293+
showSlack: Boolean
294+
showFeedback: Boolean
293295
}
294296
295297
type Opportunity {

0 commit comments

Comments
 (0)