@smartytalent/api-client 0.8.12 → 0.8.14

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.
@@ -51,11 +51,81 @@ export interface FormAttributesSchema {
51
51
  */
52
52
  shortCode?: string;
53
53
  /**
54
+ * The field schema, JSON-encoded: a flat map of `fieldId -> field`.
55
+ * A field carries `label` and `description` as locale maps, a
56
+ * `type` (text, textarea, select, checkbox, file, email, phone,
57
+ * date, number), `required`, and for a select an `options` list of
58
+ * `{value, label}` - the candidate submits `value`, never the
59
+ * localized label.
54
60
  *
61
+ * A knockout field adds `knockout: true`, `verifies` (the criterion
62
+ * it gates on) and `expectedAnswer` (the PASSING answer, matching
63
+ * one of the option values for a select). The submission gate
64
+ * rejects a candidate on a failed knockout without any AI spend, so
65
+ * a knockout missing `expectedAnswer` is refused: the gate would
66
+ * skip it and admit everyone. A knockout on a checkbox is refused
67
+ * too - a required checkbox renders as must-tick, so "No" cannot be
68
+ * expressed and the gate could never fire.
69
+ *
70
+ * Every label and option label must carry text in the form's
71
+ * `languageCode` or in `en-US` - the locales the apply page falls
72
+ * back to. A label that resolves in neither renders blank for the
73
+ * candidate and is refused.
74
+ *
75
+ * An apply form (`kind: candidateSubmission`) must keep the
76
+ * `fullName`, `email`, `phone` and `cv` fields: the apply page maps
77
+ * them onto first-class submission slots.
78
+ *
79
+ * Rejections come back as one error object per violation, each with
80
+ * a `source.pointer` at the offending field. Limit: 131072 bytes.
55
81
  * @type {string}
56
82
  * @memberof FormAttributesSchema
57
83
  */
58
84
  content?: string;
85
+ /**
86
+ * Publish transition. `true` mirrors `content` to the CDN and flips
87
+ * the form to `active`, the state guest submission intake requires.
88
+ * Send it on the same PATCH that carries the edit, or on its own to
89
+ * republish what is already stored. Needs the recruiting tier or
90
+ * above; publishing a form with no content is a 400.
91
+ * @type {boolean}
92
+ * @memberof FormAttributesSchema
93
+ */
94
+ publish?: boolean;
95
+ /**
96
+ * The form's own language as a BCP-47 tag (e.g. `pl-PL`). Stamped by
97
+ * the build pipeline; settable at create and changeable by PATCH.
98
+ *
99
+ * It is part of the RENDER FALLBACK CHAIN: the apply page tries the
100
+ * candidate's locale, then this one, then `en-US`. Every label and
101
+ * option label must resolve somewhere in that chain - in this locale
102
+ * OR in `en-US`, not necessarily both. A form with no `languageCode`
103
+ * is held to `en-US` alone. Change it and the labels in the same
104
+ * PATCH; the new text is validated against the new chain.
105
+ * @type {string}
106
+ * @memberof FormAttributesSchema
107
+ */
108
+ languageCode?: string;
109
+ /**
110
+ * Optimistic-concurrency token, bumped atomically on every write.
111
+ * Send it back as `If-Match: "<revision>"` on PATCH to make the
112
+ * write conditional; a mismatch is a 409 `SM_FORM_STALE`, meaning
113
+ * someone else saved since your read. Without the header the write
114
+ * is unconditional and the last writer wins - which for a form
115
+ * means silently replacing the whole field schema.
116
+ * @type {number}
117
+ * @memberof FormAttributesSchema
118
+ */
119
+ readonly revision?: number;
120
+ /**
121
+ * Where the published document lives. Server-managed: the server
122
+ * owns the key it wrote, so never compose this URL client-side - a
123
+ * URL built from the wrong tenant shortCode is indistinguishable
124
+ * from a correct one.
125
+ * @type {string}
126
+ * @memberof FormAttributesSchema
127
+ */
128
+ readonly publishedUrl?: string;
59
129
  /**
60
130
  *
61
131
  * @type {string}
@@ -92,5 +162,5 @@ export declare function instanceOfFormAttributesSchema(value: object): value is
92
162
  export declare function FormAttributesSchemaFromJSON(json: any): FormAttributesSchema;
93
163
  export declare function FormAttributesSchemaFromJSONTyped(json: any, ignoreDiscriminator: boolean): FormAttributesSchema;
94
164
  export declare function FormAttributesSchemaToJSON(json: any): FormAttributesSchema;
95
- export declare function FormAttributesSchemaToJSONTyped(value?: FormAttributesSchema | null, ignoreDiscriminator?: boolean): any;
165
+ export declare function FormAttributesSchemaToJSONTyped(value?: Omit<FormAttributesSchema, 'revision' | 'publishedUrl'> | null, ignoreDiscriminator?: boolean): any;
96
166
  //# sourceMappingURL=FormAttributesSchema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormAttributesSchema.d.ts","sourceRoot":"","sources":["../../src/models/FormAttributesSchema.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAQ3E;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACjC;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;;;;;;;;;OAcG;IACH,IAAI,CAAC,EAAE,4BAA4B,CAAC;IACpC;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,UAAU,CAAC,EAAE,wBAAwB,CAAC;CACzC;AAGD;;GAEG;AACH,eAAO,MAAM,4BAA4B;;;;;CAK/B,CAAC;AACX,MAAM,MAAM,4BAA4B,GAAG,OAAO,4BAA4B,CAAC,MAAM,OAAO,4BAA4B,CAAC,CAAC;AAG1H;;GAEG;AACH,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,oBAAoB,CAG3F;AAED,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,GAAG,GAAG,oBAAoB,CAE5E;AAED,wBAAgB,iCAAiC,CAAC,IAAI,EAAE,GAAG,EAAE,mBAAmB,EAAE,OAAO,GAAG,oBAAoB,CAe/G;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,GAAG,GAAG,oBAAoB,CAE1E;AAED,wBAAgB,+BAA+B,CAAC,KAAK,CAAC,EAAE,oBAAoB,GAAG,IAAI,EAAE,mBAAmB,GAAE,OAAe,GAAG,GAAG,CAgB9H"}
1
+ {"version":3,"file":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,IAAI,EAAE,GAAG,EAAE,mBAAmB,EAAE,OAAO,GAAG,oBAAoB,CAmB/G;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,GAAG,GAAG,oBAAoB,CAE1E;AAED,wBAAgB,+BAA+B,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,oBAAoB,EAAE,UAAU,GAAC,cAAc,CAAC,GAAG,IAAI,EAAE,mBAAmB,GAAE,OAAe,GAAG,GAAG,CAkB/J"}
@@ -50,6 +50,10 @@ function FormAttributesSchemaFromJSONTyped(json, ignoreDiscriminator) {
50
50
  'kind': json['kind'] == null ? undefined : json['kind'],
51
51
  'shortCode': json['shortCode'] == null ? undefined : json['shortCode'],
52
52
  'content': json['content'] == null ? undefined : json['content'],
53
+ 'publish': json['publish'] == null ? undefined : json['publish'],
54
+ 'languageCode': json['languageCode'] == null ? undefined : json['languageCode'],
55
+ 'revision': json['revision'] == null ? undefined : json['revision'],
56
+ 'publishedUrl': json['publishedUrl'] == null ? undefined : json['publishedUrl'],
53
57
  'ttl': json['ttl'] == null ? undefined : json['ttl'],
54
58
  'source': json['source'] == null ? undefined : json['source'],
55
59
  'timestamps': json['timestamps'] == null ? undefined : (0, ResourceTimestampsSchema_1.ResourceTimestampsSchemaFromJSON)(json['timestamps']),
@@ -68,6 +72,8 @@ function FormAttributesSchemaToJSONTyped(value, ignoreDiscriminator = false) {
68
72
  'kind': value['kind'],
69
73
  'shortCode': value['shortCode'],
70
74
  'content': value['content'],
75
+ 'publish': value['publish'],
76
+ 'languageCode': value['languageCode'],
71
77
  'ttl': value['ttl'],
72
78
  'source': value['source'],
73
79
  'timestamps': (0, ResourceTimestampsSchema_1.ResourceTimestampsSchemaToJSON)(value['timestamps']),
@@ -1 +1 @@
1
- {"version":3,"file":"FormAttributesSchema.js","sourceRoot":"","sources":["../../src/models/FormAttributesSchema.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;AACpB;;;;;;;;;;GAUG;;;AA6FH,wEAGC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AC,SAAS,CAAC;QAC3B,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC;QAC3B,cAAc,EAAE,KAAK,CAAC,cAAc,CAAC;QACrC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC;QACnB,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC;QACzB,YAAY,EAAE,IAAA,yDAA8B,EAAC,KAAK,CAAC,YAAY,CAAC,CAAC;KACpE,CAAC;AACN,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartytalent/api-client",
3
- "version": "0.8.12",
3
+ "version": "0.8.14",
4
4
  "description": "TypeScript API client generated from SmartyTalent OpenAPI spec",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",