@transcend-io/cli 6.7.0 → 6.9.0

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.
Files changed (88) hide show
  1. package/README.md +87 -6
  2. package/build/cli-pull-datapoints.d.ts +3 -0
  3. package/build/cli-pull-datapoints.d.ts.map +1 -0
  4. package/build/cli-pull-datapoints.js +93 -0
  5. package/build/cli-pull-datapoints.js.map +1 -0
  6. package/build/cli-request-export.js.map +1 -1
  7. package/build/codecs.d.ts +1826 -4
  8. package/build/codecs.d.ts.map +1 -1
  9. package/build/codecs.js +232 -2
  10. package/build/codecs.js.map +1 -1
  11. package/build/constants.d.ts +1 -0
  12. package/build/constants.d.ts.map +1 -1
  13. package/build/constants.js +8 -1
  14. package/build/constants.js.map +1 -1
  15. package/build/data-inventory/index.d.ts +2 -0
  16. package/build/data-inventory/index.d.ts.map +1 -0
  17. package/build/data-inventory/index.js +18 -0
  18. package/build/data-inventory/index.js.map +1 -0
  19. package/build/data-inventory/pullAllDatapoints.d.ts +78 -0
  20. package/build/data-inventory/pullAllDatapoints.d.ts.map +1 -0
  21. package/build/data-inventory/pullAllDatapoints.js +242 -0
  22. package/build/data-inventory/pullAllDatapoints.js.map +1 -0
  23. package/build/enums.d.ts +3 -1
  24. package/build/enums.d.ts.map +1 -1
  25. package/build/enums.js +2 -0
  26. package/build/enums.js.map +1 -1
  27. package/build/graphql/fetchAllAssessmentTemplates.d.ts +44 -0
  28. package/build/graphql/fetchAllAssessmentTemplates.d.ts.map +1 -0
  29. package/build/graphql/fetchAllAssessmentTemplates.js +31 -0
  30. package/build/graphql/fetchAllAssessmentTemplates.js.map +1 -0
  31. package/build/graphql/fetchAllAssessments.d.ts +309 -0
  32. package/build/graphql/fetchAllAssessments.d.ts.map +1 -0
  33. package/build/graphql/fetchAllAssessments.js +32 -0
  34. package/build/graphql/fetchAllAssessments.js.map +1 -0
  35. package/build/graphql/fetchAllRequestIdentifiers.d.ts +2 -2
  36. package/build/graphql/gqls/assessment.d.ts +3 -0
  37. package/build/graphql/gqls/assessment.d.ts.map +1 -0
  38. package/build/graphql/gqls/assessment.js +287 -0
  39. package/build/graphql/gqls/assessment.js.map +1 -0
  40. package/build/graphql/gqls/assessmentTemplate.d.ts +2 -0
  41. package/build/graphql/gqls/assessmentTemplate.d.ts.map +1 -0
  42. package/build/graphql/gqls/assessmentTemplate.js +70 -0
  43. package/build/graphql/gqls/assessmentTemplate.js.map +1 -0
  44. package/build/graphql/gqls/dataPoint.d.ts +3 -0
  45. package/build/graphql/gqls/dataPoint.d.ts.map +1 -1
  46. package/build/graphql/gqls/dataPoint.js +51 -12
  47. package/build/graphql/gqls/dataPoint.js.map +1 -1
  48. package/build/graphql/gqls/dataSilo.d.ts +1 -0
  49. package/build/graphql/gqls/dataSilo.d.ts.map +1 -1
  50. package/build/graphql/gqls/dataSilo.js +16 -1
  51. package/build/graphql/gqls/dataSilo.js.map +1 -1
  52. package/build/graphql/gqls/index.d.ts +2 -0
  53. package/build/graphql/gqls/index.d.ts.map +1 -1
  54. package/build/graphql/gqls/index.js +2 -0
  55. package/build/graphql/gqls/index.js.map +1 -1
  56. package/build/graphql/index.d.ts +4 -0
  57. package/build/graphql/index.d.ts.map +1 -1
  58. package/build/graphql/index.js +4 -0
  59. package/build/graphql/index.js.map +1 -1
  60. package/build/graphql/parseAssessmentDisplayLogic.d.ts +56 -0
  61. package/build/graphql/parseAssessmentDisplayLogic.d.ts.map +1 -0
  62. package/build/graphql/parseAssessmentDisplayLogic.js +62 -0
  63. package/build/graphql/parseAssessmentDisplayLogic.js.map +1 -0
  64. package/build/graphql/parseAssessmentRiskLogic.d.ts +27 -0
  65. package/build/graphql/parseAssessmentRiskLogic.d.ts.map +1 -0
  66. package/build/graphql/parseAssessmentRiskLogic.js +51 -0
  67. package/build/graphql/parseAssessmentRiskLogic.js.map +1 -0
  68. package/build/graphql/pullTranscendConfiguration.d.ts.map +1 -1
  69. package/build/graphql/pullTranscendConfiguration.js +220 -1
  70. package/build/graphql/pullTranscendConfiguration.js.map +1 -1
  71. package/build/graphql/syncDataSilos.d.ts +1 -1
  72. package/build/graphql/syncDataSilos.d.ts.map +1 -1
  73. package/build/graphql/syncDataSilos.js +8 -3
  74. package/build/graphql/syncDataSilos.js.map +1 -1
  75. package/build/index.d.ts +1 -0
  76. package/build/index.d.ts.map +1 -1
  77. package/build/index.js +1 -0
  78. package/build/index.js.map +1 -1
  79. package/build/manual-enrichment/pullManualEnrichmentIdentifiersToCsv.d.ts.map +1 -1
  80. package/build/manual-enrichment/pullManualEnrichmentIdentifiersToCsv.js.map +1 -1
  81. package/build/requests/approvePrivacyRequests.d.ts.map +1 -1
  82. package/build/requests/approvePrivacyRequests.js +15 -4
  83. package/build/requests/approvePrivacyRequests.js.map +1 -1
  84. package/build/requests/bulkRestartRequests.js.map +1 -1
  85. package/build/requests/pullPrivacyRequests.d.ts.map +1 -1
  86. package/build/requests/pullPrivacyRequests.js.map +1 -1
  87. package/build/tsbuildinfo +1 -1
  88. package/package.json +3 -2
@@ -0,0 +1,309 @@
1
+ import { GraphQLClient } from 'graphql-request';
2
+ import { AssessmentFormStatus, AssessmentQuestionSubType, AssessmentQuestionType, AssessmentSyncColumn, AssessmentSyncModel, AttributeSupportedResourceType, DataCategoryType, ProcessingPurpose, RetentionScheduleOperation, RetentionScheduleType } from '@transcend-io/privacy-types';
3
+ /**
4
+ * Represents an assessment with various properties and metadata.
5
+ */
6
+ export interface Assessment {
7
+ /** The ID of the assessment */
8
+ id: string;
9
+ /** The user who created the assessment */
10
+ creator: UserPreview;
11
+ /** The user who last edited the assessment */
12
+ lastEditor: UserPreview;
13
+ /** The title of the assessment */
14
+ title: string;
15
+ /** The description of the assessment */
16
+ description: string;
17
+ /** The current status of the assessment */
18
+ status: AssessmentFormStatus;
19
+ /** The users assigned to the assessment */
20
+ assignees: UserPreview[];
21
+ /** The external users assigned to the assessment */
22
+ externalAssignees: ExternalUser[];
23
+ /** The users who are reviewers of the assessment */
24
+ reviewers: UserPreview[];
25
+ /** Indicates if the assessment is locked */
26
+ isLocked: boolean;
27
+ /** Indicates if the assessment is archived */
28
+ isArchived: boolean;
29
+ /** Indicates if the assessment was created externally */
30
+ isExternallyCreated: boolean;
31
+ /** The due date of the assessment */
32
+ dueDate: string;
33
+ /** The date when the assessment was created */
34
+ createdAt: string;
35
+ /** The date when the assessment was last updated */
36
+ updatedAt: string;
37
+ /** The date when the assessment was assigned */
38
+ assignedAt: string;
39
+ /** The date when the assessment was submitted */
40
+ submittedAt: string;
41
+ /** The date when the assessment was approved */
42
+ approvedAt: string;
43
+ /** The date when the assessment was rejected */
44
+ rejectedAt: string;
45
+ /** Indicates if the title of the assessment is internal */
46
+ titleIsInternal: boolean;
47
+ /** The retention schedule of the assessment */
48
+ retentionSchedule?: RetentionSchedule;
49
+ /** The attribute values associated with the assessment */
50
+ attributeValues: AttributeValue[];
51
+ /** The sections of the assessment */
52
+ sections: AssessmentSection[];
53
+ /** The group to which the assessment belongs */
54
+ assessmentGroup: AssessmentGroup;
55
+ /** The resources associated with the assessment */
56
+ resources: AssessmentResource[];
57
+ /** The rows that are synced with the assessment */
58
+ syncedRows: AssessmentResource[];
59
+ }
60
+ export interface UserPreview {
61
+ /** ID of user */
62
+ id: string;
63
+ /** Email of user */
64
+ email: string;
65
+ /** Name of user */
66
+ name: string;
67
+ }
68
+ export interface ExternalUser {
69
+ /** ID of external user */
70
+ id: string;
71
+ /** Email of external user */
72
+ email: string;
73
+ }
74
+ export interface RetentionSchedule {
75
+ /** ID of retention schedule */
76
+ id: string;
77
+ /** Type */
78
+ type: RetentionScheduleType;
79
+ /** Duration of retention schedule */
80
+ durationDays: number;
81
+ /** The operation to perform on the retention schedule */
82
+ operation: RetentionScheduleOperation;
83
+ }
84
+ interface AttributeValue {
85
+ /** Name of attribute value */
86
+ name: string;
87
+ /** Key */
88
+ attributeKey: {
89
+ /** Name of key */
90
+ name: string;
91
+ };
92
+ }
93
+ export interface AssessmentSection {
94
+ /** ID of section */
95
+ id: string;
96
+ /** Title of section */
97
+ title: string;
98
+ /** Status of section */
99
+ status: string;
100
+ /** Index of section */
101
+ index: number;
102
+ /** Questions */
103
+ questions: AssessmentQuestion[];
104
+ /** Assignees */
105
+ assignees: UserPreview[];
106
+ /** External assignees */
107
+ externalAssignees: ExternalUser[];
108
+ /** Whether is reviewed */
109
+ isReviewed: boolean;
110
+ }
111
+ /**
112
+ * Represents a question in the assessment.
113
+ */
114
+ export interface AssessmentQuestion {
115
+ /**
116
+ * Unique identifier for the question.
117
+ */
118
+ id: string;
119
+ /** Title of the question */
120
+ title: string;
121
+ /** Index of the question in the assessment */
122
+ index: number;
123
+ /** Type of the question */
124
+ type: AssessmentQuestionType;
125
+ /** Subtype of the question */
126
+ subType: AssessmentQuestionSubType;
127
+ /** Placeholder text for the question */
128
+ placeholder: string;
129
+ /** Description of the question */
130
+ description: string;
131
+ /** Indicates if the question is required */
132
+ isRequired: boolean;
133
+ /** Logic for displaying the question */
134
+ displayLogic: string;
135
+ /** Logic for assessing risk related to the question */
136
+ riskLogic: string[];
137
+ /** Indicates if risk evaluation is required for the question */
138
+ requireRiskEvaluation: boolean;
139
+ /** Indicates if risk matrix evaluation is required for the question */
140
+ requireRiskMatrixEvaluation: boolean;
141
+ /** Categories of risk associated with the question */
142
+ riskCategories: RiskCategory[];
143
+ /** Framework used for risk assessment */
144
+ riskFramework?: RiskFramework;
145
+ /** Level of risk associated with the question */
146
+ riskLevel?: RiskLevel;
147
+ /** Risk level assigned by the reviewer */
148
+ reviewerRiskLevel?: RiskLevel;
149
+ /** Risk level derived from the risk matrix */
150
+ riskLevelFromRiskMatrix?: RiskLevel;
151
+ /** Options available for answering the question */
152
+ answerOptions: AssessmentAnswerOption[];
153
+ /** Answers selected for the question */
154
+ selectedAnswers: AssessmentAnswer[];
155
+ /** User who responded to the question */
156
+ respondent: UserPreview;
157
+ /** Key attribute associated with the question */
158
+ attributeKey?: {
159
+ /** Name of key */
160
+ name: string;
161
+ };
162
+ /** Email of the external respondent */
163
+ externalRespondentEmail?: string;
164
+ /** Comments related to the question */
165
+ comments: Comment[];
166
+ /** Allowed MIME types for file uploads in the question */
167
+ allowedMimeTypes: string[];
168
+ /** Timestamp of the last update to the question */
169
+ updatedAt: string;
170
+ /** Reference identifier for the question */
171
+ referenceId: string;
172
+ /** Previous submissions related to the question */
173
+ previousSubmissions: AssessmentPreviousSubmission[];
174
+ /** Indicates if selecting "Other" is allowed for the question */
175
+ allowSelectOther: boolean;
176
+ /** Model used for synchronization */
177
+ syncModel: AssessmentSyncModel;
178
+ /** Column used for synchronization */
179
+ syncColumn: AssessmentSyncColumn;
180
+ /** Row IDs used for synchronization */
181
+ syncRowIds: string[];
182
+ /** Indicates if synchronization override is allowed */
183
+ syncOverride: boolean;
184
+ }
185
+ export interface RiskCategory {
186
+ /** ID of category */
187
+ id: string;
188
+ /** Title of category */
189
+ title: string;
190
+ }
191
+ export interface RiskFramework {
192
+ /** ID of framework */
193
+ id: string;
194
+ /** Title of framework */
195
+ title: string;
196
+ /** Description of framework */
197
+ description: string;
198
+ /** Risk levels */
199
+ riskLevels: RiskLevel[];
200
+ /** Risk categories */
201
+ riskCategories: RiskCategory[];
202
+ /** Risk matrix columns */
203
+ riskMatrixColumns: RiskMatrixColumn[];
204
+ /** Risk matrix rows */
205
+ riskMatrixRows: RiskMatrixRow[];
206
+ /** Risk matrix settings */
207
+ riskMatrix: RiskMatrix[][];
208
+ /** Creator of risk framework */
209
+ creator?: UserPreview;
210
+ /** Risk matrix row title */
211
+ riskMatrixRowTitle: string;
212
+ /** Risk matrix column title */
213
+ riskMatrixColumnTitle: string;
214
+ }
215
+ export interface RiskLevel {
216
+ /** ID of risk level */
217
+ id: string;
218
+ /** Title of risk level */
219
+ title: string;
220
+ }
221
+ export interface RiskMatrix {
222
+ /** ID of risk matrix */
223
+ id: string;
224
+ /** Title of risk matrix */
225
+ title: string;
226
+ }
227
+ export interface RiskMatrixColumn {
228
+ /** ID of column */
229
+ id: string;
230
+ /** Title of column */
231
+ title: string;
232
+ }
233
+ export interface RiskMatrixRow {
234
+ /** ID of row */
235
+ id: string;
236
+ /** Title of row */
237
+ title: string;
238
+ }
239
+ export interface AssessmentAnswerOption {
240
+ /** ID of answer option */
241
+ id: string;
242
+ /** Index of answer option */
243
+ index: number;
244
+ /** Value of answer */
245
+ value: string;
246
+ }
247
+ export interface AssessmentAnswer {
248
+ /** ID of answer */
249
+ id: string;
250
+ /** Index of answer */
251
+ index: number;
252
+ /** Value of answer */
253
+ value: string;
254
+ }
255
+ export interface AssessmentComment {
256
+ /** ID of comment */
257
+ id: string;
258
+ /** Content of comment */
259
+ content: string;
260
+ /** Date comment made */
261
+ createdAt: string;
262
+ /** Date comment updated */
263
+ updatedAt: string;
264
+ /** Author of comment */
265
+ author?: UserPreview;
266
+ }
267
+ export interface AssessmentPreviousSubmission {
268
+ /** Id of submission */
269
+ id: string;
270
+ /** Date updated */
271
+ updatedAt: string;
272
+ /** ID of question */
273
+ assessmentQuestionId: string;
274
+ /** Answers */
275
+ answers: AssessmentAnswer[];
276
+ }
277
+ export interface AssessmentGroup {
278
+ /** ID of group */
279
+ id: string;
280
+ /** Title of group */
281
+ title: string;
282
+ /** Description of group */
283
+ description: string;
284
+ }
285
+ export interface AssessmentResource {
286
+ /** Type of resource */
287
+ resourceType: AttributeSupportedResourceType;
288
+ /** ID of resource */
289
+ id: string;
290
+ /** Title of resource */
291
+ title?: string;
292
+ /** Name of resource */
293
+ name?: string;
294
+ /** Category of resource */
295
+ category?: DataCategoryType;
296
+ /** Purpose of resource */
297
+ purpose?: ProcessingPurpose;
298
+ /** Type of integration */
299
+ type?: string;
300
+ }
301
+ /**
302
+ * Fetch all assessments in the organization
303
+ *
304
+ * @param client - GraphQL client
305
+ * @returns All assessments in the organization
306
+ */
307
+ export declare function fetchAllAssessments(client: GraphQLClient): Promise<Assessment[]>;
308
+ export {};
309
+ //# sourceMappingURL=fetchAllAssessments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetchAllAssessments.d.ts","sourceRoot":"","sources":["../../src/graphql/fetchAllAssessments.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,OAAO,EACL,oBAAoB,EACpB,yBAAyB,EACzB,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACnB,8BAA8B,EAC9B,gBAAgB,EAChB,iBAAiB,EACjB,0BAA0B,EAC1B,qBAAqB,EACtB,MAAM,6BAA6B,CAAC;AAErC;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,+BAA+B;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,0CAA0C;IAC1C,OAAO,EAAE,WAAW,CAAC;IACrB,8CAA8C;IAC9C,UAAU,EAAE,WAAW,CAAC;IACxB,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,2CAA2C;IAC3C,MAAM,EAAE,oBAAoB,CAAC;IAC7B,2CAA2C;IAC3C,SAAS,EAAE,WAAW,EAAE,CAAC;IACzB,oDAAoD;IACpD,iBAAiB,EAAE,YAAY,EAAE,CAAC;IAClC,oDAAoD;IACpD,SAAS,EAAE,WAAW,EAAE,CAAC;IACzB,4CAA4C;IAC5C,QAAQ,EAAE,OAAO,CAAC;IAClB,8CAA8C;IAC9C,UAAU,EAAE,OAAO,CAAC;IACpB,yDAAyD;IACzD,mBAAmB,EAAE,OAAO,CAAC;IAC7B,qCAAqC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,+CAA+C;IAC/C,SAAS,EAAE,MAAM,CAAC;IAClB,oDAAoD;IACpD,SAAS,EAAE,MAAM,CAAC;IAClB,gDAAgD;IAChD,UAAU,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,WAAW,EAAE,MAAM,CAAC;IACpB,gDAAgD;IAChD,UAAU,EAAE,MAAM,CAAC;IACnB,gDAAgD;IAChD,UAAU,EAAE,MAAM,C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;IAClB,qBAAqB;IACrB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,cAAc;IACd,OAAO,EAAE,gBAAgB,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,eAAe;IAC9B,kBAAkB;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,qBAAqB;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,kBAAkB;IACjC,uBAAuB;IACvB,YAAY,EAAE,8BAA8B,CAAC;IAC7C,qBAAqB;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,wBAAwB;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uBAAuB;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,0BAA0B;IAC1B,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,0BAA0B;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAID;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,UAAU,EAAE,CAAC,CAyBvB"}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fetchAllAssessments = void 0;
4
+ const gqls_1 = require("./gqls");
5
+ const makeGraphQLRequest_1 = require("./makeGraphQLRequest");
6
+ const PAGE_SIZE = 20;
7
+ /**
8
+ * Fetch all assessments in the organization
9
+ *
10
+ * @param client - GraphQL client
11
+ * @returns All assessments in the organization
12
+ */
13
+ async function fetchAllAssessments(client) {
14
+ const assessments = [];
15
+ let offset = 0;
16
+ let shouldContinue = false;
17
+ do {
18
+ const { assessmentForms: { nodes },
19
+ // eslint-disable-next-line no-await-in-loop
20
+ } = await (0, makeGraphQLRequest_1.makeGraphQLRequest)(client, gqls_1.ASSESSMENTS, {
21
+ first: PAGE_SIZE,
22
+ offset,
23
+ });
24
+ assessments.push(...nodes);
25
+ offset += PAGE_SIZE;
26
+ shouldContinue = nodes.length === PAGE_SIZE;
27
+ } while (shouldContinue);
28
+ return assessments.sort((a, b) => a.title.localeCompare(b.title));
29
+ }
30
+ exports.fetchAllAssessments = fetchAllAssessments;
31
+ /* eslint-enable max-lines */
32
+ //# sourceMappingURL=fetchAllAssessments.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetchAllAssessments.js","sourceRoot":"","sources":["../../src/graphql/fetchAllAssessments.ts"],"names":[],"mappings":";;;AAEA,iCAAqC;AACrC,6DAA0D;AA2U1D,MAAM,SAAS,GAAG,EAAE,CAAC;AAErB;;;;;GAKG;AACI,KAAK,UAAU,mBAAmB,CACvC,MAAqB;IAErB,MAAM,WAAW,GAAiB,EAAE,CAAC;IACrC,IAAI,MAAM,GAAG,CAAC,CAAC;IAEf,IAAI,cAAc,GAAG,KAAK,CAAC;IAC3B,GAAG;QACD,MAAM,EACJ,eAAe,EAAE,EAAE,KAAK,EAAE;QAC1B,4CAA4C;UAC7C,GAAG,MAAM,IAAA,uCAAkB,EAMzB,MAAM,EAAE,kBAAW,EAAE;YACtB,KAAK,EAAE,SAAS;YAChB,MAAM;SACP,CAAC,CAAC;QACH,WAAW,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;QAC3B,MAAM,IAAI,SAAS,CAAC;QACpB,cAAc,GAAG,KAAK,CAAC,MAAM,KAAK,SAAS,CAAC;KAC7C,QAAQ,cAAc,EAAE;IAEzB,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;AACpE,CAAC;AA3BD,kDA2BC;AACD,6BAA6B"}
@@ -15,8 +15,8 @@ declare const RequestIdentifier: t.TypeC<{
15
15
  thriveTrmContactId: unknown;
16
16
  customerIoId: unknown;
17
17
  linkedInURL: unknown;
18
- coreIdentifier: unknown;
19
18
  custom: unknown;
19
+ coreIdentifier: unknown;
20
20
  gaid: unknown;
21
21
  idfa: unknown;
22
22
  idfv: unknown;
@@ -54,8 +54,8 @@ export declare const RequestIdentifiersResponse: t.TypeC<{
54
54
  thriveTrmContactId: unknown;
55
55
  customerIoId: unknown;
56
56
  linkedInURL: unknown;
57
- coreIdentifier: unknown;
58
57
  custom: unknown;
58
+ coreIdentifier: unknown;
59
59
  gaid: unknown;
60
60
  idfa: unknown;
61
61
  idfv: unknown;
@@ -0,0 +1,3 @@
1
+ export declare const ASSESSMENT_SECTION_FIELDS = "\n id\n title\n status\n index\n questions {\n id\n title\n index\n type\n subType\n placeholder\n description\n isRequired\n displayLogic\n riskLogic\n requireRiskEvaluation\n requireRiskMatrixEvaluation\n riskCategories {\n id\n title\n }\n riskFramework {\n id\n title\n description\n riskLevels {\n id\n title\n }\n riskCategories {\n id\n title\n }\n riskMatrixColumns {\n id\n title\n }\n riskMatrixRows {\n id\n title\n }\n riskMatrix {\n id\n title\n }\n creator {\n id\n email\n name\n }\n riskMatrixRowTitle\n riskMatrixColumnTitle\n }\n riskLevel {\n id\n title\n }\n reviewerRiskLevel {\n id\n title\n }\n riskLevelFromRiskMatrix {\n id\n title\n }\n answerOptions {\n id\n index\n value\n }\n selectedAnswers {\n ... on AssessmentAnswerInterface {\n id\n index\n value\n }\n }\n respondent {\n id\n email\n name\n }\n attributeKey {\n name\n }\n externalRespondentEmail\n comments {\n id\n content\n createdAt\n updatedAt\n author {\n id\n email\n name\n }\n }\n allowedMimeTypes\n updatedAt\n referenceId\n previousSubmissions {\n id\n updatedAt\n assessmentQuestionId\n answers {\n ... on AssessmentAnswerInterface {\n id\n index\n value\n }\n }\n }\n allowSelectOther\n syncModel\n syncColumn\n syncRowIds\n syncOverride\n }\n assignees {\n id\n email\n name\n }\n externalAssignees {\n id\n email\n }\n isReviewed\n";
2
+ export declare const ASSESSMENTS: string;
3
+ //# sourceMappingURL=assessment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assessment.d.ts","sourceRoot":"","sources":["../../../src/graphql/gqls/assessment.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,yBAAyB,m2DAiIrC,CAAC;AASF,eAAO,MAAM,WAAW,QAgJvB,CAAC"}
@@ -0,0 +1,287 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ASSESSMENTS = exports.ASSESSMENT_SECTION_FIELDS = void 0;
4
+ const graphql_request_1 = require("graphql-request");
5
+ exports.ASSESSMENT_SECTION_FIELDS = `
6
+ id
7
+ title
8
+ status
9
+ index
10
+ questions {
11
+ id
12
+ title
13
+ index
14
+ type
15
+ subType
16
+ placeholder
17
+ description
18
+ isRequired
19
+ displayLogic
20
+ riskLogic
21
+ requireRiskEvaluation
22
+ requireRiskMatrixEvaluation
23
+ riskCategories {
24
+ id
25
+ title
26
+ }
27
+ riskFramework {
28
+ id
29
+ title
30
+ description
31
+ riskLevels {
32
+ id
33
+ title
34
+ }
35
+ riskCategories {
36
+ id
37
+ title
38
+ }
39
+ riskMatrixColumns {
40
+ id
41
+ title
42
+ }
43
+ riskMatrixRows {
44
+ id
45
+ title
46
+ }
47
+ riskMatrix {
48
+ id
49
+ title
50
+ }
51
+ creator {
52
+ id
53
+ email
54
+ name
55
+ }
56
+ riskMatrixRowTitle
57
+ riskMatrixColumnTitle
58
+ }
59
+ riskLevel {
60
+ id
61
+ title
62
+ }
63
+ reviewerRiskLevel {
64
+ id
65
+ title
66
+ }
67
+ riskLevelFromRiskMatrix {
68
+ id
69
+ title
70
+ }
71
+ answerOptions {
72
+ id
73
+ index
74
+ value
75
+ }
76
+ selectedAnswers {
77
+ ... on AssessmentAnswerInterface {
78
+ id
79
+ index
80
+ value
81
+ }
82
+ }
83
+ respondent {
84
+ id
85
+ email
86
+ name
87
+ }
88
+ attributeKey {
89
+ name
90
+ }
91
+ externalRespondentEmail
92
+ comments {
93
+ id
94
+ content
95
+ createdAt
96
+ updatedAt
97
+ author {
98
+ id
99
+ email
100
+ name
101
+ }
102
+ }
103
+ allowedMimeTypes
104
+ updatedAt
105
+ referenceId
106
+ previousSubmissions {
107
+ id
108
+ updatedAt
109
+ assessmentQuestionId
110
+ answers {
111
+ ... on AssessmentAnswerInterface {
112
+ id
113
+ index
114
+ value
115
+ }
116
+ }
117
+ }
118
+ allowSelectOther
119
+ syncModel
120
+ syncColumn
121
+ syncRowIds
122
+ syncOverride
123
+ }
124
+ assignees {
125
+ id
126
+ email
127
+ name
128
+ }
129
+ externalAssignees {
130
+ id
131
+ email
132
+ }
133
+ isReviewed
134
+ `;
135
+ // TODO: https://transcend.height.app/T-27909 - enable optimizations
136
+ // isExportCsv: true
137
+ // useMaster: false
138
+ // orderBy: [
139
+ // { field: createdAt, direction: ASC }
140
+ // { field: name, direction: ASC }
141
+ // ]
142
+ exports.ASSESSMENTS = (0, graphql_request_1.gql) `
143
+ query TranscendCliAssessments(
144
+ $first: Int!
145
+ $offset: Int!
146
+ $filterBy: AssessmentFormFiltersInput
147
+ ) {
148
+ assessmentForms(first: $first, offset: $offset, filterBy: $filterBy) {
149
+ nodes {
150
+ id
151
+ creator {
152
+ id
153
+ email
154
+ name
155
+ }
156
+ lastEditor {
157
+ id
158
+ email
159
+ name
160
+ }
161
+ title
162
+ description
163
+ status
164
+ assignees {
165
+ id
166
+ email
167
+ name
168
+ }
169
+ externalAssignees {
170
+ id
171
+ email
172
+ }
173
+ reviewers {
174
+ id
175
+ email
176
+ name
177
+ }
178
+ isLocked
179
+ isArchived
180
+ isExternallyCreated
181
+ dueDate
182
+ createdAt
183
+ updatedAt
184
+ assignedAt
185
+ submittedAt
186
+ approvedAt
187
+ rejectedAt
188
+ titleIsInternal
189
+ retentionSchedule {
190
+ id
191
+ type
192
+ durationDays
193
+ operation
194
+ }
195
+ attributeValues {
196
+ name
197
+ attributeKey {
198
+ name
199
+ }
200
+ }
201
+ sections {
202
+ ${exports.ASSESSMENT_SECTION_FIELDS}
203
+ }
204
+ assessmentGroup {
205
+ id
206
+ title
207
+ description
208
+ }
209
+ resources {
210
+ resourceType
211
+ ... on AttributeBusinessEntityResource {
212
+ id
213
+ title
214
+ }
215
+ ... on AttributeDataSiloResource {
216
+ id
217
+ title
218
+ }
219
+ ... on AttributeDataSubCategoryResource {
220
+ id
221
+ name
222
+ category
223
+ }
224
+ ... on AttributeSubDataPointResource {
225
+ id
226
+ name
227
+ }
228
+ ... on AttributeProcessingPurposeSubCategoryResource {
229
+ id
230
+ name
231
+ purpose
232
+ }
233
+ ... on AttributeRequestResource {
234
+ id
235
+ type
236
+ }
237
+ ... on AttributeVendorResource {
238
+ id
239
+ title
240
+ }
241
+ ... on AttributePromptResource {
242
+ id
243
+ title
244
+ }
245
+ ... on AttributePromptRunResource {
246
+ id
247
+ title
248
+ }
249
+ ... on AttributePromptGroupResource {
250
+ id
251
+ title
252
+ }
253
+ }
254
+ syncedRows {
255
+ resourceType
256
+ ... on AttributeBusinessEntityResource {
257
+ id
258
+ title
259
+ }
260
+ ... on AttributeDataSiloResource {
261
+ id
262
+ title
263
+ }
264
+ ... on AttributeDataSubCategoryResource {
265
+ id
266
+ name
267
+ category
268
+ }
269
+ ... on AttributeSubDataPointResource {
270
+ id
271
+ name
272
+ }
273
+ ... on AttributeProcessingPurposeSubCategoryResource {
274
+ id
275
+ name
276
+ purpose
277
+ }
278
+ ... on AttributeVendorResource {
279
+ id
280
+ title
281
+ }
282
+ }
283
+ }
284
+ }
285
+ }
286
+ `;
287
+ //# sourceMappingURL=assessment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assessment.js","sourceRoot":"","sources":["../../../src/graphql/gqls/assessment.ts"],"names":[],"mappings":";;;AAAA,qDAAsC;AAEzB,QAAA,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiIxC,CAAC;AAEF,oEAAoE;AACpE,oBAAoB;AACpB,mBAAmB;AACnB,aAAa;AACb,yCAAyC;AACzC,oCAAoC;AACpC,IAAI;AACS,QAAA,WAAW,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA4DlB,iCAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoFpC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const ASSESSMENT_TEMPLATES: string;
2
+ //# sourceMappingURL=assessmentTemplate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assessmentTemplate.d.ts","sourceRoot":"","sources":["../../../src/graphql/gqls/assessmentTemplate.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,oBAAoB,QAwDhC,CAAC"}