@abcagency/hire-control-sdk 1.1.9 → 1.1.10

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.
@@ -1,5 +1,5 @@
1
1
  import FetchHandler from "../handlers/fetchHandler";
2
- import { type JobListing } from "../types/JobListing";
2
+ import { type JobListing, type JobListingSaveResult } from "../types/JobListing";
3
3
  import { API_URL } from "../constants/config";
4
4
 
5
5
  const fetchHandler = new FetchHandler(API_URL);
@@ -139,8 +139,8 @@ class JobListingsController {
139
139
  id: string,
140
140
  jobListing: JobListing,
141
141
  authToken: string | null = null
142
- ): Promise<void> {
143
- return fetchHandler.put<JobListing, void>(
142
+ ): Promise<JobListingSaveResult> {
143
+ return fetchHandler.put<JobListing, JobListingSaveResult>(
144
144
  `/joblistings/${id}`,
145
145
  jobListing,
146
146
  true,
@@ -1,4 +1,4 @@
1
- import { type JobListing } from "../types/JobListing";
1
+ import { type JobListing, type JobListingSaveResult } from "../types/JobListing";
2
2
  /**
3
3
  * Controller for handling job listing API requests.
4
4
  */
@@ -61,7 +61,7 @@ declare class JobListingsController {
61
61
  * @param authToken - The authentication token.
62
62
  * @returns A promise that resolves when the operation is complete.
63
63
  */
64
- updateJobListing(id: string, jobListing: JobListing, authToken?: string | null): Promise<void>;
64
+ updateJobListing(id: string, jobListing: JobListing, authToken?: string | null): Promise<JobListingSaveResult>;
65
65
  /**
66
66
  * Export job listings as a CSV file.
67
67
  * @param {number} pageSize - Number of results per page (default: 10).
package/dist/index.d.ts CHANGED
@@ -15,7 +15,7 @@ import AppendListing from "./types/appendListing";
15
15
  import Form, { FormFieldMigrationRequest, FormUpdateOptions } from "./types/form";
16
16
  import FormSubmission, { FormSubmissionStatus } from "./types/formSubmission";
17
17
  import ResultsWrapper from "./types/resultsWrapper";
18
- import { JobListing } from "./types/JobListing";
18
+ import { JobListing, JobListingSaveResult } from "./types/JobListing";
19
19
  import FieldTypeDefinition from "./types/content/fieldDefinition";
20
20
  import ValidatorDefinition from "./types/content/validatorDefinition";
21
21
  import ContentModel, { ModuleConfig, ModuleFieldMapping, ModuleIdentityMapping, WebPageTemplate, WebPageTemplateSection, WebPageTemplateBlock, ContentModuleSyncPreview, ContentModuleSyncExecuteRequest, ContentModuleSyncExecuteResult } from "./types/content/model";
@@ -86,12 +86,8 @@ export declare const integrationConfig: {
86
86
  getSearchRead: (authToken?: string | null) => Promise<SearchReadConfig | null>;
87
87
  };
88
88
  export declare const media: {
89
- upload: (media: MediaType, authToken?: string | null) => Promise<{
90
- Url: string;
91
- }>;
92
- uploadProfileImage: (media: MediaType, authToken?: string | null) => Promise<{
93
- Url: string;
94
- }>;
89
+ upload: (media: MediaType, authToken?: string | null) => Promise<MediaType>;
90
+ uploadProfileImage: (media: MediaType, authToken?: string | null) => Promise<MediaType>;
95
91
  get: (folderKey: string, authToken?: string | null) => Promise<MediaType[]>;
96
92
  delete: (key: string, authToken?: string | null) => Promise<void>;
97
93
  };
@@ -199,7 +195,7 @@ export declare const jobListings: {
199
195
  needsApproval: boolean;
200
196
  }, authToken?: string | null) => Promise<void>;
201
197
  create: (jobListing: JobListing, authToken?: string | null) => Promise<JobListing>;
202
- update: (id: string, jobListing: JobListing, authToken?: string | null) => Promise<void>;
198
+ update: (id: string, jobListing: JobListing, authToken?: string | null) => Promise<JobListingSaveResult>;
203
199
  delete: (id: string, authToken?: string | null) => Promise<void>;
204
200
  };
205
201
  export declare const contentField: {
@@ -259,7 +255,7 @@ export declare const formSubmissions: {
259
255
  getFormSubmissionTypes(authToken?: string | null): Promise<string[]>;
260
256
  };
261
257
  export { BLOCK_KEYS, BLOCK_KEY_ALIASES, FIELD_TYPES };
262
- export type { Register, User, Role, HireControlConfig, ThemeSystemConfig, ThemeSemanticToken, ThemeScaleToken, ClientAuthConfig, Event, Listing, EventDates, EventDateType, EventInstance, MediaType, Filters, AppendListing, Form, FormFieldMigrationRequest, FormUpdateOptions, FormSubmission, ResultsWrapper, Company, JobListing, FieldTypeDefinition, ValidatorDefinition, ContentModel, ModuleConfig, ModuleFieldMapping, ModuleIdentityMapping, WebPageTemplate, WebPageTemplateSection, WebPageTemplateBlock, ContentModuleSyncPreview, ContentModuleSyncExecuteRequest, ContentModuleSyncExecuteResult, ContentBlock, BlockUpdateImpact, BlockFieldChange, BlockFieldMigration, ContentEntry, Blog, CategoryListDto, AddValueRequest, CategoryListValueDto, JobFeed, JobFeedFieldMapping, MultipleFieldConfig, ConditionalConfig, ConditionalRule, JobListingSettings, ListingEntityDto, RecruiterDto, FocalPoint, ListingEntityMedia, CompletionRequest, CompletionResponse, SearchReadConfig, };
258
+ export type { Register, User, Role, HireControlConfig, ThemeSystemConfig, ThemeSemanticToken, ThemeScaleToken, ClientAuthConfig, Event, Listing, EventDates, EventDateType, EventInstance, MediaType, Filters, AppendListing, Form, FormFieldMigrationRequest, FormUpdateOptions, FormSubmission, ResultsWrapper, Company, JobListing, JobListingSaveResult, FieldTypeDefinition, ValidatorDefinition, ContentModel, ModuleConfig, ModuleFieldMapping, ModuleIdentityMapping, WebPageTemplate, WebPageTemplateSection, WebPageTemplateBlock, ContentModuleSyncPreview, ContentModuleSyncExecuteRequest, ContentModuleSyncExecuteResult, ContentBlock, BlockUpdateImpact, BlockFieldChange, BlockFieldMigration, ContentEntry, Blog, CategoryListDto, AddValueRequest, CategoryListValueDto, JobFeed, JobFeedFieldMapping, MultipleFieldConfig, ConditionalConfig, ConditionalRule, JobListingSettings, ListingEntityDto, RecruiterDto, FocalPoint, ListingEntityMedia, CompletionRequest, CompletionResponse, SearchReadConfig, };
263
259
  export type { BlockKey, FieldType };
264
260
  export { EventType, CallToActionType, FormSubmissionStatus, FeedHandlingOption, };
265
261
  declare const hcApi: {
@@ -325,12 +321,8 @@ declare const hcApi: {
325
321
  };
326
322
  listings: ListingsControllerType;
327
323
  media: {
328
- upload: (media: MediaType, authToken?: string | null) => Promise<{
329
- Url: string;
330
- }>;
331
- uploadProfileImage: (media: MediaType, authToken?: string | null) => Promise<{
332
- Url: string;
333
- }>;
324
+ upload: (media: MediaType, authToken?: string | null) => Promise<MediaType>;
325
+ uploadProfileImage: (media: MediaType, authToken?: string | null) => Promise<MediaType>;
334
326
  get: (folderKey: string, authToken?: string | null) => Promise<MediaType[]>;
335
327
  delete: (key: string, authToken?: string | null) => Promise<void>;
336
328
  };
@@ -450,7 +442,7 @@ declare const hcApi: {
450
442
  needsApproval: boolean;
451
443
  }, authToken?: string | null) => Promise<void>;
452
444
  create: (jobListing: JobListing, authToken?: string | null) => Promise<JobListing>;
453
- update: (id: string, jobListing: JobListing, authToken?: string | null) => Promise<void>;
445
+ update: (id: string, jobListing: JobListing, authToken?: string | null) => Promise<JobListingSaveResult>;
454
446
  delete: (id: string, authToken?: string | null) => Promise<void>;
455
447
  };
456
448
  };
@@ -13,6 +13,10 @@ export type JobListing = {
13
13
  eoeStatement: string | null;
14
14
  status: JobStatus;
15
15
  };
16
+ export type JobListingSaveResult = {
17
+ message?: string;
18
+ warningMessage?: string | null;
19
+ };
16
20
  export type JobFields = {
17
21
  position: string | null;
18
22
  category: string | null;
@@ -66,6 +66,7 @@ export interface CmsNavigationNode {
66
66
  navLabel?: string;
67
67
  linkUrl?: string;
68
68
  isExternal?: boolean;
69
+ openInNewTab?: boolean;
69
70
  isButton?: boolean;
70
71
  showInNav?: boolean;
71
72
  autoPopulate?: CmsNavigationAutoPopulate;
package/index.ts CHANGED
@@ -61,7 +61,7 @@ import Form, {
61
61
  } from "./types/form";
62
62
  import FormSubmission, { FormSubmissionStatus } from "./types/formSubmission";
63
63
  import ResultsWrapper from "./types/resultsWrapper";
64
- import { JobListing } from "./types/JobListing";
64
+ import { JobListing, JobListingSaveResult } from "./types/JobListing";
65
65
  import FieldTypeDefinition from "./types/content/fieldDefinition";
66
66
  import ValidatorDefinition from "./types/content/validatorDefinition";
67
67
  import ContentModel, {
@@ -360,6 +360,7 @@ export type {
360
360
  ResultsWrapper,
361
361
  Company,
362
362
  JobListing,
363
+ JobListingSaveResult,
363
364
  FieldTypeDefinition,
364
365
  ValidatorDefinition,
365
366
  ContentModel,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abcagency/hire-control-sdk",
3
- "version": "1.1.9",
3
+ "version": "1.1.10",
4
4
  "main": "dist/index.cjs.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "types": "dist/index.d.ts",
@@ -14,6 +14,11 @@ export type JobListing = {
14
14
  status: JobStatus;
15
15
  };
16
16
 
17
+ export type JobListingSaveResult = {
18
+ message?: string;
19
+ warningMessage?: string | null;
20
+ };
21
+
17
22
  export type JobFields = {
18
23
  position: string | null;
19
24
  category: string | null;
@@ -75,6 +75,7 @@ export interface CmsNavigationNode {
75
75
  navLabel?: string;
76
76
  linkUrl?: string;
77
77
  isExternal?: boolean;
78
+ openInNewTab?: boolean;
78
79
  isButton?: boolean;
79
80
  showInNav?: boolean;
80
81
  autoPopulate?: CmsNavigationAutoPopulate;