@abcagency/hire-control-sdk 1.1.1 → 1.1.3
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/.gitattributes +1 -0
- package/constants/cms.ts +60 -0
- package/controllers/categoryListsController.ts +29 -4
- package/controllers/content/blocksController.ts +62 -4
- package/controllers/content/contentEntriesController.ts +31 -4
- package/controllers/jobListingsController.ts +36 -0
- package/dist/constants/cms.d.ts +53 -0
- package/dist/controllers/categoryListsController.d.ts +12 -3
- package/dist/controllers/content/blocksController.d.ts +10 -0
- package/dist/controllers/content/contentEntriesController.d.ts +9 -0
- package/dist/controllers/jobListingsController.d.ts +12 -0
- package/dist/handlers/normalize-casing.d.ts +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +38 -4
- package/dist/types/JobListing.d.ts +1 -0
- package/dist/types/categoryList.d.ts +7 -2
- package/dist/types/content/blockUpdateImpact.d.ts +22 -0
- package/dist/types/content/model.d.ts +32 -0
- package/dist/types/hireControlConfig.d.ts +14 -0
- package/dist/types/listing.d.ts +3 -0
- package/dist/types/listingEntity.d.ts +3 -0
- package/dist/types/listingEntityMedia.d.ts +12 -0
- package/dist/types/mongoListingEntity.d.ts +3 -0
- package/handlers/fetchHandler.ts +27 -4
- package/handlers/normalize-casing.ts +36 -0
- package/index.ts +35 -2
- package/package.json +2 -1
- package/types/JobListing.ts +1 -0
- package/types/categoryList.ts +8 -2
- package/types/content/blockUpdateImpact.ts +24 -0
- package/types/content/model.ts +35 -0
- package/types/hireControlConfig.ts +16 -0
- package/types/listing.ts +4 -0
- package/types/listingEntity.ts +3 -0
- package/types/listingEntityMedia.ts +14 -0
- package/types/mongoListingEntity.ts +3 -0
package/index.ts
CHANGED
|
@@ -50,7 +50,10 @@ import Event, {
|
|
|
50
50
|
import { Listing } from "./types/listing";
|
|
51
51
|
import Filters from "./types/filters/filters";
|
|
52
52
|
import AppendListing from "./types/appendListing";
|
|
53
|
-
import Form, {
|
|
53
|
+
import Form, {
|
|
54
|
+
FormFieldMigrationRequest,
|
|
55
|
+
FormUpdateOptions,
|
|
56
|
+
} from "./types/form";
|
|
54
57
|
import FormSubmission, { FormSubmissionStatus } from "./types/formSubmission";
|
|
55
58
|
import ResultsWrapper from "./types/resultsWrapper";
|
|
56
59
|
import { JobListing } from "./types/JobListing";
|
|
@@ -69,8 +72,16 @@ import ContentModel, {
|
|
|
69
72
|
} from "./types/content/model";
|
|
70
73
|
import ContentBlock from "./types/content/block";
|
|
71
74
|
import ContentEntry from "./types/content/contentEntry";
|
|
75
|
+
import {
|
|
76
|
+
BlockUpdateImpact,
|
|
77
|
+
BlockFieldChange,
|
|
78
|
+
BlockFieldMigration,
|
|
79
|
+
} from "./types/content/blockUpdateImpact";
|
|
72
80
|
import Blog from "./types/blog";
|
|
73
|
-
import CategoryListDto, {
|
|
81
|
+
import CategoryListDto, {
|
|
82
|
+
AddValueRequest,
|
|
83
|
+
CategoryListValueDto,
|
|
84
|
+
} from "./types/categoryList";
|
|
74
85
|
import JobFeed from "./types/jobFeed";
|
|
75
86
|
import JobFeedFieldMapping, {
|
|
76
87
|
MultipleFieldConfig,
|
|
@@ -83,10 +94,18 @@ import JobListingSettings, {
|
|
|
83
94
|
import ListingEntityDto from "./types/listingEntity";
|
|
84
95
|
import RecruiterDto from "./types/recruiter";
|
|
85
96
|
import FocalPoint from "./types/focalPoint";
|
|
97
|
+
import ListingEntityMedia from "./types/listingEntityMedia";
|
|
86
98
|
import CompletionRequest, {
|
|
87
99
|
CompletionResponse,
|
|
88
100
|
} from "./types/completionRequest";
|
|
89
101
|
import SearchReadConfig from "./types/searchReadConfig";
|
|
102
|
+
import {
|
|
103
|
+
BLOCK_KEYS,
|
|
104
|
+
BLOCK_KEY_ALIASES,
|
|
105
|
+
FIELD_TYPES,
|
|
106
|
+
type BlockKey,
|
|
107
|
+
type FieldType,
|
|
108
|
+
} from "./constants/cms";
|
|
90
109
|
|
|
91
110
|
export const auth = {
|
|
92
111
|
login: authController.login,
|
|
@@ -193,6 +212,7 @@ export const categoryLists = {
|
|
|
193
212
|
delete: categoryListsController.deleteCategoryList,
|
|
194
213
|
addValue: categoryListsController.addValue,
|
|
195
214
|
removeValue: categoryListsController.removeValue,
|
|
215
|
+
updateValue: categoryListsController.updateValue,
|
|
196
216
|
updateValues: categoryListsController.updateValues,
|
|
197
217
|
};
|
|
198
218
|
|
|
@@ -255,6 +275,9 @@ export const jobListings = {
|
|
|
255
275
|
getMapListings: JobListingsController.getMapJobListingsByCompany,
|
|
256
276
|
getMapListing: JobListingsController.getMapListingById,
|
|
257
277
|
getById: JobListingsController.getJobListingById,
|
|
278
|
+
updateFieldVersionApproval: JobListingsController.updateFieldVersionApproval,
|
|
279
|
+
updateDescriptionVersionApproval:
|
|
280
|
+
JobListingsController.updateDescriptionVersionApproval,
|
|
258
281
|
create: JobListingsController.createJobListing,
|
|
259
282
|
update: JobListingsController.updateJobListing,
|
|
260
283
|
delete: JobListingsController.deleteJobListing,
|
|
@@ -271,6 +294,7 @@ export const contentValidator = {
|
|
|
271
294
|
export const contentEntries = {
|
|
272
295
|
getAll: contentEntriesController.getContentEntries,
|
|
273
296
|
getById: contentEntriesController.getContentEntry,
|
|
297
|
+
getBySlug: contentEntriesController.getContentEntryBySlug,
|
|
274
298
|
create: contentEntriesController.createContentEntry,
|
|
275
299
|
update: contentEntriesController.updateContentEntry,
|
|
276
300
|
delete: contentEntriesController.deleteContentEntry,
|
|
@@ -282,6 +306,8 @@ export const contentBlocks = {
|
|
|
282
306
|
getById: blocksController.getBlock,
|
|
283
307
|
create: blocksController.createBlock,
|
|
284
308
|
update: blocksController.updateBlock,
|
|
309
|
+
updateWithMigrations: blocksController.updateBlockWithMigrations,
|
|
310
|
+
previewUpdate: blocksController.previewBlockUpdate,
|
|
285
311
|
delete: blocksController.deleteBlock,
|
|
286
312
|
getTemplateBlocks: blocksController.getTemplateBlocks,
|
|
287
313
|
};
|
|
@@ -302,6 +328,7 @@ export const openAI = {
|
|
|
302
328
|
|
|
303
329
|
export const forms = formsController;
|
|
304
330
|
export const formSubmissions = formSubmissionController;
|
|
331
|
+
export { BLOCK_KEYS, BLOCK_KEY_ALIASES, FIELD_TYPES };
|
|
305
332
|
//types
|
|
306
333
|
export type {
|
|
307
334
|
Register,
|
|
@@ -337,10 +364,14 @@ export type {
|
|
|
337
364
|
ContentModuleSyncExecuteRequest,
|
|
338
365
|
ContentModuleSyncExecuteResult,
|
|
339
366
|
ContentBlock,
|
|
367
|
+
BlockUpdateImpact,
|
|
368
|
+
BlockFieldChange,
|
|
369
|
+
BlockFieldMigration,
|
|
340
370
|
ContentEntry,
|
|
341
371
|
Blog,
|
|
342
372
|
CategoryListDto,
|
|
343
373
|
AddValueRequest,
|
|
374
|
+
CategoryListValueDto,
|
|
344
375
|
JobFeed,
|
|
345
376
|
JobFeedFieldMapping,
|
|
346
377
|
MultipleFieldConfig,
|
|
@@ -350,10 +381,12 @@ export type {
|
|
|
350
381
|
ListingEntityDto,
|
|
351
382
|
RecruiterDto,
|
|
352
383
|
FocalPoint,
|
|
384
|
+
ListingEntityMedia,
|
|
353
385
|
CompletionRequest,
|
|
354
386
|
CompletionResponse,
|
|
355
387
|
SearchReadConfig,
|
|
356
388
|
};
|
|
389
|
+
export type { BlockKey, FieldType };
|
|
357
390
|
|
|
358
391
|
export {
|
|
359
392
|
EventType,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abcagency/hire-control-sdk",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"main": "dist/index.cjs.js",
|
|
5
5
|
"module": "dist/index.esm.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"rollup-plugin-typescript2": "^0.36.0"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
+
"@abcagency/hire-control-sdk": "^1.1.2",
|
|
31
32
|
"tslib": "^2.7.0",
|
|
32
33
|
"typescript": "^5.6.2"
|
|
33
34
|
}
|
package/types/JobListing.ts
CHANGED
package/types/categoryList.ts
CHANGED
|
@@ -5,13 +5,18 @@ export type ModifiedByDto = {
|
|
|
5
5
|
dateTime: string;
|
|
6
6
|
};
|
|
7
7
|
|
|
8
|
+
export type CategoryListValueDto = {
|
|
9
|
+
displayValue: string;
|
|
10
|
+
displayInForms: boolean;
|
|
11
|
+
};
|
|
12
|
+
|
|
8
13
|
export type CategoryListDto = {
|
|
9
14
|
id: string;
|
|
10
15
|
companyId: string;
|
|
11
16
|
type: string;
|
|
12
17
|
name: string;
|
|
13
18
|
description?: string;
|
|
14
|
-
values: Record<string,
|
|
19
|
+
values: Record<string, CategoryListValueDto>;
|
|
15
20
|
isActive: boolean;
|
|
16
21
|
autoAddNewValues: boolean;
|
|
17
22
|
notifyOnNewValues: boolean;
|
|
@@ -23,7 +28,8 @@ export type CategoryListDto = {
|
|
|
23
28
|
|
|
24
29
|
export type AddValueRequest = {
|
|
25
30
|
key: string;
|
|
26
|
-
|
|
31
|
+
displayValue: string;
|
|
32
|
+
displayInForms: boolean;
|
|
27
33
|
};
|
|
28
34
|
|
|
29
35
|
export default CategoryListDto;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type BlockFieldChange = {
|
|
2
|
+
oldKey?: string;
|
|
3
|
+
newKey?: string;
|
|
4
|
+
key?: string;
|
|
5
|
+
affectedEntryCount?: number;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export type BlockUpdateImpact = {
|
|
9
|
+
renamedFields?: BlockFieldChange[];
|
|
10
|
+
removedFields?: BlockFieldChange[];
|
|
11
|
+
addedFields?: BlockFieldChange[];
|
|
12
|
+
affectedEntries?: Array<{
|
|
13
|
+
usedIn?: string;
|
|
14
|
+
title?: string;
|
|
15
|
+
}>;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type BlockFieldMigration = {
|
|
19
|
+
type: "rename" | "remove";
|
|
20
|
+
oldKey?: string;
|
|
21
|
+
newKey?: string;
|
|
22
|
+
key?: string;
|
|
23
|
+
cleanup?: boolean;
|
|
24
|
+
};
|
package/types/content/model.ts
CHANGED
|
@@ -15,6 +15,34 @@ export type ModuleFieldMapping = {
|
|
|
15
15
|
applyOnSync?: boolean;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
+
export type ModuleGrouping = {
|
|
19
|
+
enabled?: boolean;
|
|
20
|
+
groupBySourcePath?: string;
|
|
21
|
+
displayNameSourcePath?: string;
|
|
22
|
+
sourceKeyPrefix?: string;
|
|
23
|
+
includeUngrouped?: boolean;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export type ModuleSectionRepeaterFieldMapping = {
|
|
27
|
+
targetField?: string;
|
|
28
|
+
sourcePath?: string;
|
|
29
|
+
slugifyValue?: boolean;
|
|
30
|
+
buildUrlPath?: boolean;
|
|
31
|
+
urlPathBase?: string;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type ModuleSectionRepeater = {
|
|
35
|
+
id?: string;
|
|
36
|
+
sectionId?: string;
|
|
37
|
+
sectionIndex?: number;
|
|
38
|
+
blockKey?: string;
|
|
39
|
+
sourceCollectionPath?: string;
|
|
40
|
+
itemIdentitySourcePath?: string;
|
|
41
|
+
applyOnSync?: boolean;
|
|
42
|
+
syncOnRead?: boolean;
|
|
43
|
+
fieldMappings?: ModuleSectionRepeaterFieldMapping[];
|
|
44
|
+
};
|
|
45
|
+
|
|
18
46
|
export type ModuleSourceFilter = {
|
|
19
47
|
combinator?: "and" | "or" | string;
|
|
20
48
|
rules?: Array<any>;
|
|
@@ -32,6 +60,10 @@ export type WebPageTemplateSection = {
|
|
|
32
60
|
title?: string;
|
|
33
61
|
slug?: string;
|
|
34
62
|
showInNav?: boolean;
|
|
63
|
+
layout?: Record<string, any>;
|
|
64
|
+
items?: Array<Record<string, any>>;
|
|
65
|
+
collapsed?: boolean;
|
|
66
|
+
order?: number;
|
|
35
67
|
blocks?: WebPageTemplateBlock[];
|
|
36
68
|
};
|
|
37
69
|
|
|
@@ -43,8 +75,11 @@ export type ModuleConfig = {
|
|
|
43
75
|
sourceType?: "listingEntities" | "jobListings" | "categoryLists" | string;
|
|
44
76
|
autoSetupEntries?: boolean;
|
|
45
77
|
identityMapping?: ModuleIdentityMapping;
|
|
78
|
+
slugPrefixSourcePath?: string;
|
|
46
79
|
fieldMappings?: ModuleFieldMapping[];
|
|
47
80
|
sourceFilter?: ModuleSourceFilter;
|
|
81
|
+
grouping?: ModuleGrouping;
|
|
82
|
+
sectionRepeaters?: ModuleSectionRepeater[];
|
|
48
83
|
webPageTemplate?: WebPageTemplate;
|
|
49
84
|
};
|
|
50
85
|
|
|
@@ -76,9 +76,25 @@ export interface CmsNavigationNode {
|
|
|
76
76
|
isExternal?: boolean;
|
|
77
77
|
isButton?: boolean;
|
|
78
78
|
showInNav?: boolean;
|
|
79
|
+
autoPopulate?: CmsNavigationAutoPopulate;
|
|
79
80
|
children?: CmsNavigationNode[];
|
|
80
81
|
}
|
|
81
82
|
|
|
83
|
+
export interface CmsNavigationAutoPopulate {
|
|
84
|
+
enabled?: boolean;
|
|
85
|
+
modelIds?: string[];
|
|
86
|
+
maxItems?: number;
|
|
87
|
+
matchParentSlugPrefix?: boolean;
|
|
88
|
+
childAutoPopulate?: CmsNavigationAutoPopulateRule;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface CmsNavigationAutoPopulateRule {
|
|
92
|
+
enabled?: boolean;
|
|
93
|
+
modelIds?: string[];
|
|
94
|
+
maxItems?: number;
|
|
95
|
+
matchParentSlugPrefix?: boolean;
|
|
96
|
+
}
|
|
97
|
+
|
|
82
98
|
export interface CmsNavigationConfig {
|
|
83
99
|
version?: number;
|
|
84
100
|
maxDepth?: number;
|
package/types/listing.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import ListingEntityMedia from "./listingEntityMedia";
|
|
2
|
+
|
|
1
3
|
export type Listing = {
|
|
2
4
|
id: number;
|
|
3
5
|
fields?: ListingFields;
|
|
@@ -79,6 +81,8 @@ export type ListingEntity = {
|
|
|
79
81
|
travelTime?: string;
|
|
80
82
|
logoUrl?: string;
|
|
81
83
|
photoUrl?: string;
|
|
84
|
+
logo?: ListingEntityMedia;
|
|
85
|
+
photo?: ListingEntityMedia;
|
|
82
86
|
descriptionJson?: string;
|
|
83
87
|
descriptionHtml?: string;
|
|
84
88
|
descriptionPlainText?: string;
|
package/types/listingEntity.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Address } from './company';
|
|
2
|
+
import ListingEntityMedia from './listingEntityMedia';
|
|
2
3
|
|
|
3
4
|
export type ListingEntityDto = {
|
|
4
5
|
id: number;
|
|
@@ -12,6 +13,8 @@ export type ListingEntityDto = {
|
|
|
12
13
|
staticMapUrl?: string;
|
|
13
14
|
logoUrl?: string;
|
|
14
15
|
photoUrl?: string;
|
|
16
|
+
logo?: ListingEntityMedia;
|
|
17
|
+
photo?: ListingEntityMedia;
|
|
15
18
|
descriptionJson?: string;
|
|
16
19
|
descriptionHtml?: string;
|
|
17
20
|
descriptionPlainText?: string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import FocalPoint from "./focalPoint";
|
|
2
|
+
|
|
3
|
+
export type ListingEntityMedia = {
|
|
4
|
+
url?: string;
|
|
5
|
+
alt?: string;
|
|
6
|
+
focalPoint?: FocalPoint;
|
|
7
|
+
aspectRatio?: string;
|
|
8
|
+
width?: number;
|
|
9
|
+
height?: number;
|
|
10
|
+
fileSize?: number;
|
|
11
|
+
variant?: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default ListingEntityMedia;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Address } from "./company";
|
|
2
|
+
import ListingEntityMedia from "./listingEntityMedia";
|
|
2
3
|
|
|
3
4
|
export type mongoListingEntity = {
|
|
4
5
|
id: string;
|
|
@@ -13,6 +14,8 @@ export type mongoListingEntity = {
|
|
|
13
14
|
entityKey?: string;
|
|
14
15
|
logoUrl?: string;
|
|
15
16
|
photoUrl?: string;
|
|
17
|
+
logo?: ListingEntityMedia;
|
|
18
|
+
photo?: ListingEntityMedia;
|
|
16
19
|
descriptionJson?: string;
|
|
17
20
|
descriptionHtml?: string;
|
|
18
21
|
descriptionPlainText?: string;
|