Skip to content

Commit

Permalink
chore: remove 10dlc references
Browse files Browse the repository at this point in the history
  • Loading branch information
ajohn25 committed Apr 2, 2024
1 parent e797064 commit a9a8161
Show file tree
Hide file tree
Showing 24 changed files with 12 additions and 773 deletions.
1 change: 0 additions & 1 deletion libs/gql-schema/messaging-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export const schema = `
messagingServiceSid: String!
serviceType: MessagingServiceType!
updatedAt: String!
tcrBrandRegistrationLink: String
name: String
active: Boolean!
isDefault: Boolean
Expand Down
33 changes: 1 addition & 32 deletions libs/gql-schema/notice.ts
Original file line number Diff line number Diff line change
@@ -1,35 +1,4 @@
export const schema = `
interface Register10DlcNotice {
id: ID!
tcrRegistrationUrl: String
}
type Register10DlcBrandNotice implements Register10DlcNotice {
id: ID!
tcrRegistrationUrl: String
}
type Register10DlcCampaignNotice implements Register10DlcNotice {
id: ID!
tcrRegistrationUrl: String
}
type Pending10DlcCampaignNotice {
id: ID!
}
interface PricingNotice {
id: ID!
}
type Pricing10DlcNotice implements PricingNotice {
id: ID!
}
type PricingTollFreeNotice implements PricingNotice {
id: ID!
}
type TitleContentNotice {
id: ID!
title: String!
Expand All @@ -38,7 +7,7 @@ export const schema = `
markdownContent: String!
}
union Notice = Register10DlcBrandNotice | Register10DlcCampaignNotice | Pending10DlcCampaignNotice | Pricing10DlcNotice | PricingTollFreeNotice | TitleContentNotice
union Notice = TitleContentNotice
type NoticeEdge {
cursor: Cursor!
Expand Down
17 changes: 0 additions & 17 deletions libs/spoke-codegen/src/graphql/notifications.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,6 @@ query getOrganizationNotifications($organizationId: String!) {
avatarColor
markdownContent
}
... on Register10DlcBrandNotice {
id
tcrRegistrationUrl
}
... on Register10DlcCampaignNotice {
id
tcrRegistrationUrl
}
... on Pending10DlcCampaignNotice {
id
}
... on Pricing10DlcNotice {
id
}
... on PricingTollFreeNotice {
id
}
}
}
}
Expand Down
54 changes: 2 additions & 52 deletions src/api/notice.ts
Original file line number Diff line number Diff line change
@@ -1,60 +1,10 @@
import type {
Notice,
Pending10DlcCampaignNotice,
Pricing10DlcNotice,
PricingTollFreeNotice,
Register10DlcBrandNotice,
Register10DlcCampaignNotice,
TitleContentNotice
} from "@spoke/spoke-codegen";
import type { Notice, TitleContentNotice } from "@spoke/spoke-codegen";
import type { GraphQLType } from "graphql";

// eslint-disable-next-line import/prefer-default-export
export function isTitleContentNotice(obj: Notice): obj is TitleContentNotice {
return (
(obj as TitleContentNotice & GraphQLType).__typename ===
"TitleContentNotice"
);
}

export function isRegister10DlcBrandNotice(
obj: Notice
): obj is Register10DlcBrandNotice {
return (
(obj as Register10DlcBrandNotice & GraphQLType).__typename ===
"Register10DlcBrandNotice"
);
}

export function isRegister10DlcCampaignNotice(
obj: Notice
): obj is Register10DlcCampaignNotice {
return (
(obj as Register10DlcCampaignNotice & GraphQLType).__typename ===
"Register10DlcCampaignNotice"
);
}

export function isPending10DlcCampaignNotice(
obj: Notice
): obj is Pending10DlcCampaignNotice {
return (
(obj as Pending10DlcCampaignNotice & GraphQLType).__typename ===
"Pending10DlcCampaignNotice"
);
}

export function isPricing10DlcNotice(obj: Notice): obj is Pricing10DlcNotice {
return (
(obj as Pricing10DlcNotice & GraphQLType).__typename ===
"Pricing10DlcNotice"
);
}

export function isPricingTollFreeNotice(
obj: Notice
): obj is PricingTollFreeNotice {
return (
(obj as PricingTollFreeNotice & GraphQLType).__typename ===
"PricingTollFreeNotice"
);
}
27 changes: 0 additions & 27 deletions src/components/NoticeText/BrandRegistration10DlcNoticeText.tsx

This file was deleted.

40 changes: 0 additions & 40 deletions src/components/NoticeText/CampaignRegistration10DlcNoticeText.tsx

This file was deleted.

17 changes: 0 additions & 17 deletions src/components/NoticeText/KnowledgeBaseText.tsx

This file was deleted.

15 changes: 0 additions & 15 deletions src/components/NoticeText/Pending10DlcCampaignNoticeText.tsx

This file was deleted.

20 changes: 0 additions & 20 deletions src/components/NoticeText/Pricing10DlcNoticeText.tsx

This file was deleted.

20 changes: 0 additions & 20 deletions src/components/NoticeText/PricingTollFreeNoticeText.tsx

This file was deleted.

10 changes: 0 additions & 10 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,6 @@ const validators = {
default: false,
isClient: true
}),
ENABLE_REWIRED_SHUTDOWN_NOTICE: bool({
desc: "Show the Rewired shutdown notice",
default: true
}),
DISABLE_ASSIGNMENT_CASCADE: bool({
desc:
"Whether to just assign from 1 campaign rather than gathering from multiple to fulfill a request",
Expand Down Expand Up @@ -449,12 +445,6 @@ const validators = {
"A comma separated list of contact fields to not ship to the client. Can include 'external_id, cell, and lastName'",
default: ""
}),
SHOW_10DLC_REGISTRATION_NOTICES: bool({
desc:
"Whether the 10DLC Registration Notices are displayed to Admins and Owners",
default: true,
isClient: true
}),
JOBS_SAME_PROCESS: bool({
desc:
"Whether jobs should be executed in the same process in which they are created (vs. processing asyncronously via worker processes).",
Expand Down
26 changes: 1 addition & 25 deletions src/containers/AdminDashboard/components/NotificationCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,7 @@ import Divider from "@material-ui/core/Divider";
import { useGetOrganizationNotificationsQuery } from "@spoke/spoke-codegen";
import React from "react";

import {
isPending10DlcCampaignNotice,
isPricing10DlcNotice,
isPricingTollFreeNotice,
isRegister10DlcBrandNotice,
isRegister10DlcCampaignNotice,
isTitleContentNotice
} from "../../../api/notice";
import Pending10DlcCampaignNoticeCard from "./Pending10DlcCampaignNoticeCard";
import PricingNoticeCard from "./PricingNoticeCard";
import Register10DlcNoticeCard from "./Register10DlcNoticeCard";
import { isTitleContentNotice } from "../../../api/notice";
import TitleContentNoticeCard from "./TitleContentNoticeCard";

interface NotificationCardProps {
Expand Down Expand Up @@ -52,20 +42,6 @@ export const NotificationCard: React.FC<NotificationCardProps> = ({
/>
);
}
if (window.SHOW_10DLC_REGISTRATION_NOTICES) {
if (
isRegister10DlcBrandNotice(node) ||
isRegister10DlcCampaignNotice(node)
) {
return <Register10DlcNoticeCard key={node.id} {...node} />;
}
if (isPending10DlcCampaignNotice(node)) {
return <Pending10DlcCampaignNoticeCard key={node.id} {...node} />;
}
if (isPricing10DlcNotice(node) || isPricingTollFreeNotice(node)) {
return <PricingNoticeCard key={node.id} {...node} />;
}
}
return null;
})}
{data?.notices.pageInfo.totalCount > 0 && <Divider />}
Expand Down

This file was deleted.

Loading

0 comments on commit a9a8161

Please sign in to comment.