@smartytalent/api-client 0.8.13 → 0.8.15

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.
@@ -67,6 +67,11 @@ export interface FormAttributesSchema {
67
67
  * too - a required checkbox renders as must-tick, so "No" cannot be
68
68
  * expressed and the gate could never fire.
69
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
+ *
70
75
  * An apply form (`kind: candidateSubmission`) must keep the
71
76
  * `fullName`, `email`, `phone` and `cv` fields: the apply page maps
72
77
  * them onto first-class submission slots.
@@ -87,6 +92,20 @@ export interface FormAttributesSchema {
87
92
  * @memberof FormAttributesSchema
88
93
  */
89
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;
90
109
  /**
91
110
  * Optimistic-concurrency token, bumped atomically on every write.
92
111
  * Send it back as `If-Match: "<revision>"` on PATCH to make the
@@ -98,6 +117,27 @@ export interface FormAttributesSchema {
98
117
  * @memberof FormAttributesSchema
99
118
  */
100
119
  readonly revision?: number;
120
+ /**
121
+ * Fill missing locales on the field schema, asynchronously. Fires
122
+ * after the write lands, so it can ride the same PATCH as an edit or
123
+ * be sent alone. Targets the tenant's active languages plus the
124
+ * form's own `languageCode`, translating FROM the `en-US` text - a
125
+ * field with no `en-US` label is skipped rather than invented.
126
+ *
127
+ * Fill-only-missing: text already present in a locale is never
128
+ * overwritten, and an operator edit that lands mid-run wins (the
129
+ * fill re-merges only what is still missing). Field ids,
130
+ * `options[].value`, `knockout`, `verifies` and `expectedAnswer` are
131
+ * never touched, so the tokens the submission gate compares survive.
132
+ *
133
+ * The outcome lands in `meta.translation`
134
+ * (`status`, `translated`, `locales`, `startedAt`, `finishedAt`);
135
+ * poll `showForm` for it. Publishing is separate: the filled text
136
+ * reaches the apply page on the next `publish: true`.
137
+ * @type {boolean}
138
+ * @memberof FormAttributesSchema
139
+ */
140
+ translate?: boolean;
101
141
  /**
102
142
  * Where the published document lives. Server-managed: the server
103
143
  * owns the key it wrote, so never compose this URL client-side - a
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;;;OASG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;;;;OAOG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IA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,CAAC;IAClB;;;;;;;;;;;;OAYG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;;;;;OASG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;;;;;;;;;;;;;;;;OAmBG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;;;OAOG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B;;;;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,CAoB/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,CAmB/J"}
@@ -51,7 +51,9 @@ function FormAttributesSchemaFromJSONTyped(json, ignoreDiscriminator) {
51
51
  'shortCode': json['shortCode'] == null ? undefined : json['shortCode'],
52
52
  'content': json['content'] == null ? undefined : json['content'],
53
53
  'publish': json['publish'] == null ? undefined : json['publish'],
54
+ 'languageCode': json['languageCode'] == null ? undefined : json['languageCode'],
54
55
  'revision': json['revision'] == null ? undefined : json['revision'],
56
+ 'translate': json['translate'] == null ? undefined : json['translate'],
55
57
  'publishedUrl': json['publishedUrl'] == null ? undefined : json['publishedUrl'],
56
58
  'ttl': json['ttl'] == null ? undefined : json['ttl'],
57
59
  'source': json['source'] == null ? undefined : json['source'],
@@ -72,6 +74,8 @@ function FormAttributesSchemaToJSONTyped(value, ignoreDiscriminator = false) {
72
74
  'shortCode': value['shortCode'],
73
75
  'content': value['content'],
74
76
  'publish': value['publish'],
77
+ 'languageCode': value['languageCode'],
78
+ 'translate': value['translate'],
75
79
  'ttl': value['ttl'],
76
80
  'source': value['source'],
77
81
  '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;;;AAgJH,wEAGC;AAED,oEAEC;AAED,8EAkBC;AAED,gEAEC;AAED,0EAiBC;AA9LD,yEAKoC;AAwHpC;;GAEG;AACU,QAAA,4BAA4B,GAAG;IACxC,QAAQ,EAAE,UAAU;IACpB,mBAAmB,EAAE,qBAAqB;IAC1C,gBAAgB,EAAE,kBAAkB;IACpC,OAAO,EAAE,SAAS;CACZ,CAAC;AAIX;;GAEG;AACH,SAAgB,8BAA8B,CAAC,KAAa;IACxD,IAAI,CAAC,CAAC,MAAM,IAAI,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IACpE,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,SAAgB,4BAA4B,CAAC,IAAS;IAClD,OAAO,iCAAiC,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AAC1D,CAAC;AAED,SAAgB,iCAAiC,CAAC,IAA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S,EAAE,KAAK,CAAC,SAAS,CAAC;QAC3B,cAAc,EAAE,KAAK,CAAC,cAAc,CAAC;QACrC,WAAW,EAAE,KAAK,CAAC,WAAW,CAAC;QAC/B,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.13",
3
+ "version": "0.8.15",
4
4
  "description": "TypeScript API client generated from SmartyTalent OpenAPI spec",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",