@transcend-io/cli
Advanced tools
Comparing version 3.0.2 to 4.0.0
@@ -296,2 +296,39 @@ import * as t from 'io-ts'; | ||
export declare type DatapointInput = t.TypeOf<typeof DatapointInput>; | ||
export declare const PromptAVendorEmailSettings: t.PartialC<{ | ||
/** The email address of the user to notify when a promptAPerson integration */ | ||
'notify-email-address': t.StringC; | ||
/** | ||
* The frequency with which we should be sending emails for this data silo, in milliseconds. | ||
*/ | ||
'send-frequency': t.NumberC; | ||
/** | ||
* The type of emails to send for this data silo, i.e. send an email for each DSR, across all open DSRs, | ||
* or per profile in a DSR. | ||
*/ | ||
'send-type': t.KeyofC<{ | ||
PER_DSR: unknown; | ||
PER_PROFILE: unknown; | ||
CROSS_DSR: unknown; | ||
}>; | ||
/** | ||
* Indicates whether prompt-a-vendor emails should include a list of identifiers | ||
* in addition to a link to the bulk processing UI. | ||
*/ | ||
'include-identifiers-attachment': t.BooleanC; | ||
/** | ||
* Indicates what kind of link to generate as part of the emails sent out for this Prompt-a-Vendor silo. | ||
*/ | ||
'completion-link-type': t.KeyofC<{ | ||
LOGGED_IN_USER: unknown; | ||
UNAUTHENTICATED_EXTERNAL_USER: unknown; | ||
NO_LINK_MARK_DATAPOINT_AS_RESOLVED: unknown; | ||
}>; | ||
/** | ||
* The frequency with which we should retry sending emails for this data silo, in milliseconds. | ||
* Needs to be a string because the number can be larger than the MAX_INT | ||
*/ | ||
'manual-work-retry-frequency': t.StringC; | ||
}>; | ||
/** Type override */ | ||
export declare type PromptAVendorEmailSettings = t.TypeOf<typeof PromptAVendorEmailSettings>; | ||
/** | ||
@@ -318,4 +355,2 @@ * Input to define a data silo | ||
url: t.StringC; | ||
/** The email address of the user to notify when a promptAPerson integration */ | ||
'notify-email-address': t.StringC; | ||
/** The title of the API key that will be used to respond to privacy requests */ | ||
@@ -460,2 +495,37 @@ 'api-key-title': t.StringC; | ||
}>]>>; | ||
'email-settings': t.PartialC<{ | ||
/** The email address of the user to notify when a promptAPerson integration */ | ||
'notify-email-address': t.StringC; | ||
/** | ||
* The frequency with which we should be sending emails for this data silo, in milliseconds. | ||
*/ | ||
'send-frequency': t.NumberC; | ||
/** | ||
* The type of emails to send for this data silo, i.e. send an email for each DSR, across all open DSRs, | ||
* or per profile in a DSR. | ||
*/ | ||
'send-type': t.KeyofC<{ | ||
PER_DSR: unknown; | ||
PER_PROFILE: unknown; | ||
CROSS_DSR: unknown; | ||
}>; | ||
/** | ||
* Indicates whether prompt-a-vendor emails should include a list of identifiers | ||
* in addition to a link to the bulk processing UI. | ||
*/ | ||
'include-identifiers-attachment': t.BooleanC; | ||
/** | ||
* Indicates what kind of link to generate as part of the emails sent out for this Prompt-a-Vendor silo. | ||
*/ | ||
'completion-link-type': t.KeyofC<{ | ||
LOGGED_IN_USER: unknown; | ||
UNAUTHENTICATED_EXTERNAL_USER: unknown; | ||
NO_LINK_MARK_DATAPOINT_AS_RESOLVED: unknown; | ||
}>; | ||
/** | ||
* The frequency with which we should retry sending emails for this data silo, in milliseconds. | ||
* Needs to be a string because the number can be larger than the MAX_INT | ||
*/ | ||
'manual-work-retry-frequency': t.StringC; | ||
}>; | ||
}>]>; | ||
@@ -523,4 +593,2 @@ /** Type override */ | ||
url: t.StringC; | ||
/** The email address of the user to notify when a promptAPerson integration */ | ||
'notify-email-address': t.StringC; | ||
/** The title of the API key that will be used to respond to privacy requests */ | ||
@@ -665,2 +733,37 @@ 'api-key-title': t.StringC; | ||
}>]>>; | ||
'email-settings': t.PartialC<{ | ||
/** The email address of the user to notify when a promptAPerson integration */ | ||
'notify-email-address': t.StringC; | ||
/** | ||
* The frequency with which we should be sending emails for this data silo, in milliseconds. | ||
*/ | ||
'send-frequency': t.NumberC; | ||
/** | ||
* The type of emails to send for this data silo, i.e. send an email for each DSR, across all open DSRs, | ||
* or per profile in a DSR. | ||
*/ | ||
'send-type': t.KeyofC<{ | ||
PER_DSR: unknown; | ||
PER_PROFILE: unknown; | ||
CROSS_DSR: unknown; | ||
}>; | ||
/** | ||
* Indicates whether prompt-a-vendor emails should include a list of identifiers | ||
* in addition to a link to the bulk processing UI. | ||
*/ | ||
'include-identifiers-attachment': t.BooleanC; | ||
/** | ||
* Indicates what kind of link to generate as part of the emails sent out for this Prompt-a-Vendor silo. | ||
*/ | ||
'completion-link-type': t.KeyofC<{ | ||
LOGGED_IN_USER: unknown; | ||
UNAUTHENTICATED_EXTERNAL_USER: unknown; | ||
NO_LINK_MARK_DATAPOINT_AS_RESOLVED: unknown; | ||
}>; | ||
/** | ||
* The frequency with which we should retry sending emails for this data silo, in milliseconds. | ||
* Needs to be a string because the number can be larger than the MAX_INT | ||
*/ | ||
'manual-work-retry-frequency': t.StringC; | ||
}>; | ||
}>]>>; | ||
@@ -667,0 +770,0 @@ }>; |
@@ -22,3 +22,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TranscendInput = exports.DataSiloInput = exports.DatapointInput = exports.FieldInput = exports.DataCategoryInput = exports.ProcessingPurposeInput = exports.EnricherInput = exports.ApiKeyInput = void 0; | ||
exports.TranscendInput = exports.DataSiloInput = exports.PromptAVendorEmailSettings = exports.DatapointInput = exports.FieldInput = exports.DataCategoryInput = exports.ProcessingPurposeInput = exports.EnricherInput = exports.ApiKeyInput = void 0; | ||
const t = __importStar(require("io-ts")); | ||
@@ -158,2 +158,29 @@ const type_utils_1 = require("@transcend-io/type-utils"); | ||
]); | ||
exports.PromptAVendorEmailSettings = t.partial({ | ||
/** The email address of the user to notify when a promptAPerson integration */ | ||
'notify-email-address': t.string, | ||
/** | ||
* The frequency with which we should be sending emails for this data silo, in milliseconds. | ||
*/ | ||
'send-frequency': t.number, | ||
/** | ||
* The type of emails to send for this data silo, i.e. send an email for each DSR, across all open DSRs, | ||
* or per profile in a DSR. | ||
*/ | ||
'send-type': (0, type_utils_1.valuesOf)(privacy_types_1.PromptAVendorEmailSendType), | ||
/** | ||
* Indicates whether prompt-a-vendor emails should include a list of identifiers | ||
* in addition to a link to the bulk processing UI. | ||
*/ | ||
'include-identifiers-attachment': t.boolean, | ||
/** | ||
* Indicates what kind of link to generate as part of the emails sent out for this Prompt-a-Vendor silo. | ||
*/ | ||
'completion-link-type': (0, type_utils_1.valuesOf)(privacy_types_1.PromptAVendorEmailCompletionLinkType), | ||
/** | ||
* The frequency with which we should retry sending emails for this data silo, in milliseconds. | ||
* Needs to be a string because the number can be larger than the MAX_INT | ||
*/ | ||
'manual-work-retry-frequency': t.string, | ||
}); | ||
/** | ||
@@ -182,4 +209,2 @@ * Input to define a data silo | ||
url: t.string, | ||
/** The email address of the user to notify when a promptAPerson integration */ | ||
'notify-email-address': t.string, | ||
/** The title of the API key that will be used to respond to privacy requests */ | ||
@@ -219,2 +244,3 @@ 'api-key-title': t.string, | ||
datapoints: t.array(exports.DatapointInput), | ||
'email-settings': exports.PromptAVendorEmailSettings, | ||
}), | ||
@@ -221,0 +247,0 @@ ]); |
@@ -5,2 +5,3 @@ export declare const DATA_SILOS: string; | ||
export declare const CREATE_DATA_SILO: string; | ||
export declare const UPDATE_PROMPT_A_VENDOR_SETTINGS: string; | ||
//# sourceMappingURL=dataSilo.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.CREATE_DATA_SILO = exports.UPDATE_DATA_SILO = exports.DATA_SILO = exports.DATA_SILOS = void 0; | ||
exports.UPDATE_PROMPT_A_VENDOR_SETTINGS = exports.CREATE_DATA_SILO = exports.UPDATE_DATA_SILO = exports.DATA_SILO = exports.DATA_SILOS = void 0; | ||
const graphql_request_1 = require("graphql-request"); | ||
@@ -22,2 +22,5 @@ exports.DATA_SILOS = (0, graphql_request_1.gql) ` | ||
type | ||
catalog { | ||
hasAvcFunctionality | ||
} | ||
} | ||
@@ -52,3 +55,11 @@ } | ||
} | ||
catalog { | ||
hasAvcFunctionality | ||
} | ||
isLive | ||
promptAVendorEmailSendFrequency | ||
promptAVendorEmailSendType | ||
promptAVendorEmailIncludeIdentifiersAttachment | ||
promptAVendorEmailCompletionLinkType | ||
manualWorkRetryFrequency | ||
} | ||
@@ -123,2 +134,5 @@ } | ||
type | ||
catalog { | ||
hasAvcFunctionality | ||
} | ||
} | ||
@@ -128,2 +142,27 @@ } | ||
`; | ||
exports.UPDATE_PROMPT_A_VENDOR_SETTINGS = (0, graphql_request_1.gql) ` | ||
mutation UpdatePromptAVendorEmailSendSettings( | ||
$dataSiloId: ID! | ||
$notifyEmailAddress: String | ||
$promptAVendorEmailSendFrequency: Int | ||
$promptAVendorEmailSendType: PromptAVendorEmailSendType | ||
$promptAVendorEmailIncludeIdentifiersAttachment: Boolean | ||
$promptAVendorEmailCompletionLinkType: PromptAVendorEmailCompletionLinkType | ||
$manualWorkRetryFrequency: String | ||
) { | ||
updatePromptAVendorEmailSendSettings( | ||
input: { | ||
dataSiloId: $dataSiloId | ||
notifyEmailAddress: $notifyEmailAddress | ||
promptAVendorEmailSendFrequency: $promptAVendorEmailSendFrequency | ||
promptAVendorEmailSendType: $promptAVendorEmailSendType | ||
promptAVendorEmailIncludeIdentifiersAttachment: $promptAVendorEmailIncludeIdentifiersAttachment | ||
promptAVendorEmailCompletionLinkType: $promptAVendorEmailCompletionLinkType | ||
manualWorkRetryFrequency: $manualWorkRetryFrequency | ||
} | ||
) { | ||
clientMutationId | ||
} | ||
} | ||
`; | ||
//# sourceMappingURL=dataSilo.js.map |
@@ -56,3 +56,3 @@ "use strict"; | ||
// Save data silos | ||
result['data-silos'] = dataSilos.map(([{ title, description, url, type, apiKeys, notifyEmailAddress, identifiers, dependentDataSilos, owners, subjectBlocklist, isLive, }, dataPoints,]) => { | ||
result['data-silos'] = dataSilos.map(([{ title, description, url, type, apiKeys, notifyEmailAddress, identifiers, dependentDataSilos, owners, subjectBlocklist, isLive, promptAVendorEmailSendFrequency, promptAVendorEmailSendType, promptAVendorEmailIncludeIdentifiersAttachment, promptAVendorEmailCompletionLinkType, manualWorkRetryFrequency, catalog, }, dataPoints,]) => { | ||
var _a; | ||
@@ -68,3 +68,2 @@ return ({ | ||
.map(({ name }) => name), | ||
'notify-email-address': notifyEmailAddress || undefined, | ||
'deletion-dependencies': dependentDataSilos.map(({ title }) => title), | ||
@@ -76,2 +75,14 @@ owners: owners.map(({ email }) => email), | ||
: undefined, | ||
...(catalog.hasAvcFunctionality | ||
? { | ||
'email-settings': { | ||
'notify-email-address': notifyEmailAddress || undefined, | ||
'send-frequency': promptAVendorEmailSendFrequency, | ||
'send-type': promptAVendorEmailSendType, | ||
'include-identifiers-attachment': promptAVendorEmailIncludeIdentifiersAttachment, | ||
'completion-link-type': promptAVendorEmailCompletionLinkType, | ||
'manual-work-retry-frequency': manualWorkRetryFrequency, | ||
}, | ||
} | ||
: {}), | ||
datapoints: dataPoints.map((dataPoint) => ({ | ||
@@ -78,0 +89,0 @@ title: dataPoint.title.defaultMessage, |
@@ -5,3 +5,3 @@ import { DataCategoryInput, DataSiloInput, ProcessingPurposeInput } from '../codecs'; | ||
import { ApiKey } from './fetchApiKeys'; | ||
import { RequestActionObjectResolver } from '@transcend-io/privacy-types'; | ||
import { PromptAVendorEmailCompletionLinkType, PromptAVendorEmailSendType, RequestActionObjectResolver } from '@transcend-io/privacy-types'; | ||
export interface DataSilo { | ||
@@ -16,2 +16,7 @@ /** ID of dataSilo */ | ||
link: string; | ||
/** Metadata for this data silo */ | ||
catalog: { | ||
/** Whether the data silo supports automated vendor coordination */ | ||
hasAvcFunctionality: boolean; | ||
}; | ||
} | ||
@@ -63,2 +68,7 @@ /** | ||
}[]; | ||
/** Metadata for this data silo */ | ||
catalog: { | ||
/** Whether the data silo supports automated vendor coordination */ | ||
hasAvcFunctionality: boolean; | ||
}; | ||
/** Database integration queries */ | ||
@@ -134,4 +144,32 @@ dbIntegrationQueries: { | ||
}[]; | ||
/** Metadata for this data silo */ | ||
catalog: { | ||
/** Whether the data silo supports automated vendor coordination */ | ||
hasAvcFunctionality: boolean; | ||
}; | ||
/** Silo is live */ | ||
isLive: boolean; | ||
/** | ||
* The frequency with which we should be sending emails for this data silo, in milliseconds. | ||
*/ | ||
promptAVendorEmailSendFrequency: number; | ||
/** | ||
* The type of emails to send for this data silo, i.e. send an email for each DSR, across all open DSRs, | ||
* or per profile in a DSR. | ||
*/ | ||
promptAVendorEmailSendType: PromptAVendorEmailSendType; | ||
/** | ||
* Indicates whether prompt-a-vendor emails should include a list of identifiers | ||
* in addition to a link to the bulk processing UI. | ||
*/ | ||
promptAVendorEmailIncludeIdentifiersAttachment: boolean; | ||
/** | ||
* Indicates what kind of link to generate as part of the emails sent out for this Prompt-a-Vendor silo. | ||
*/ | ||
promptAVendorEmailCompletionLinkType: PromptAVendorEmailCompletionLinkType; | ||
/** | ||
* The frequency with which we should retry sending emails for this data silo, in milliseconds. | ||
* Needs to be a string because the number can be larger than the MAX_INT | ||
*/ | ||
manualWorkRetryFrequency: string; | ||
} | ||
@@ -160,3 +198,3 @@ /** | ||
*/ | ||
export declare function syncDataSilo({ datapoints, ...dataSilo }: DataSiloInput, client: GraphQLClient, dataSubjectsByName: { | ||
export declare function syncDataSilo({ datapoints, 'email-settings': promptAVendorEmailSettings, ...dataSilo }: DataSiloInput, client: GraphQLClient, dataSubjectsByName: { | ||
[type in string]: DataSubject; | ||
@@ -163,0 +201,0 @@ }, apiKeysByTitle: { |
@@ -58,3 +58,3 @@ "use strict"; | ||
first: PAGE_SIZE, | ||
dataPoints: [dataPointId], | ||
dataPointIds: [dataPointId], | ||
offset, | ||
@@ -132,3 +132,3 @@ }); | ||
*/ | ||
async function syncDataSilo({ datapoints, ...dataSilo }, client, dataSubjectsByName, apiKeysByTitle) { | ||
async function syncDataSilo({ datapoints, 'email-settings': promptAVendorEmailSettings, ...dataSilo }, client, dataSubjectsByName, apiKeysByTitle) { | ||
// Try to fetch an dataSilo with the same title | ||
@@ -147,3 +147,2 @@ const matches = await fetchAllDataSilos(client, { title: dataSilo.title }); | ||
ownerEmails: dataSilo.owners, | ||
notifyEmailAddress: dataSilo['notify-email-address'], | ||
// clear out if not specified, otherwise the update needs to be applied after | ||
@@ -171,3 +170,2 @@ // all data silos are created | ||
ownerEmails: dataSilo.owners, | ||
notifyEmailAddress: dataSilo['notify-email-address'], | ||
// clear out if not specified, otherwise the update needs to be applied after | ||
@@ -187,2 +185,21 @@ // all data silos are created | ||
} | ||
if (promptAVendorEmailSettings) { | ||
if (!existingDataSilo.catalog.hasAvcFunctionality) { | ||
logger_1.logger.info(colors_1.default.red(`The data silo ${dataSilo.title} does not support setting email-settings. Please remove this field your yml file.`)); | ||
process.exit(1); | ||
} | ||
else { | ||
logger_1.logger.info(colors_1.default.magenta(`Syncing email settings for data silo ${dataSilo.title}...`)); | ||
await client.request(gqls_1.UPDATE_PROMPT_A_VENDOR_SETTINGS, { | ||
dataSiloId: existingDataSilo.id, | ||
notifyEmailAddress: promptAVendorEmailSettings['notify-email-address'], | ||
promptAVendorEmailSendFrequency: promptAVendorEmailSettings['send-frequency'], | ||
promptAVendorEmailSendType: promptAVendorEmailSettings['send-type'], | ||
promptAVendorEmailIncludeIdentifiersAttachment: promptAVendorEmailSettings['include-identifiers-attachment'], | ||
promptAVendorEmailCompletionLinkType: promptAVendorEmailSettings['completion-link-type'], | ||
promptAVendorEmailManualWorkRetryFrequency: promptAVendorEmailSettings['manual-work-retry-frequency'], | ||
}); | ||
logger_1.logger.info(colors_1.default.green(`Synced email-settings for data silo ${dataSilo.title}!`)); | ||
} | ||
} | ||
// Sync datapoints | ||
@@ -189,0 +206,0 @@ if (datapoints) { |
@@ -5,3 +5,3 @@ { | ||
"description": "Small package containing useful typescript utilities.", | ||
"version": "3.0.2", | ||
"version": "4.0.0", | ||
"homepage": "https://github.com/transcend-io/cli", | ||
@@ -33,3 +33,3 @@ "repository": { | ||
"dependencies": { | ||
"@transcend-io/privacy-types": "^1.13.1", | ||
"@transcend-io/privacy-types": "^2.0.1", | ||
"@transcend-io/type-utils": "^1.0.5", | ||
@@ -36,0 +36,0 @@ "bluebird": "^3.7.2", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
257673
3164
+ Added@transcend-io/privacy-types@2.2.1(transitive)
- Removed@transcend-io/privacy-types@1.15.3(transitive)