@spotto/contract 1.0.70-alpha.31 → 1.0.70-alpha.32

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 (41) hide show
  1. package/dist/assets/get/query.d.ts +12 -0
  2. package/dist/assets/get/response.d.ts +6 -0
  3. package/dist/assets/index.d.ts +1 -0
  4. package/dist/assets/index.js +1 -0
  5. package/dist/assets/index.js.map +1 -1
  6. package/dist/assets/partitions/index.d.ts +2 -0
  7. package/dist/assets/partitions/index.js +19 -0
  8. package/dist/assets/partitions/index.js.map +1 -0
  9. package/dist/assets/partitions/query.d.ts +9 -0
  10. package/dist/assets/partitions/query.js +3 -0
  11. package/dist/assets/partitions/query.js.map +1 -0
  12. package/dist/assets/partitions/response.d.ts +10 -0
  13. package/dist/assets/partitions/response.js +3 -0
  14. package/dist/assets/partitions/response.js.map +1 -0
  15. package/dist/fields/[id]/get.d.ts +1 -0
  16. package/dist/fields/[id]/patch/request.d.ts +1 -0
  17. package/dist/fields/constants.d.ts +9 -0
  18. package/dist/fields/constants.js +15 -1
  19. package/dist/fields/constants.js.map +1 -1
  20. package/dist/fields/post/request.d.ts +4 -0
  21. package/dist/fields/post/request.js.map +1 -1
  22. package/dist/snapshots/[id]/get.d.ts +3 -0
  23. package/dist/snapshots/[id]/get.js.map +1 -1
  24. package/dist/types/[id]/patch/request.d.ts +7 -1
  25. package/dist/types/constants.d.ts +9 -0
  26. package/dist/types/constants.js +13 -0
  27. package/dist/types/constants.js.map +1 -0
  28. package/dist/types/index.d.ts +1 -0
  29. package/dist/types/index.js +1 -0
  30. package/dist/types/index.js.map +1 -1
  31. package/dist/types/post/request.d.ts +5 -1
  32. package/dist/types/post/request.js.map +1 -1
  33. package/dist/users/console.d.ts +15 -0
  34. package/dist/users/console.js +5 -0
  35. package/dist/users/console.js.map +1 -0
  36. package/dist/users/index.d.ts +1 -0
  37. package/dist/users/index.js +1 -0
  38. package/dist/users/index.js.map +1 -1
  39. package/dist/users/password-reset.d.ts +8 -1
  40. package/dist/users/post/request.d.ts +6 -0
  41. package/package.json +2 -2
@@ -66,6 +66,18 @@ export interface AssetFilters {
66
66
  export interface GetAssetsQuery extends AssetFilters {
67
67
  page?: number;
68
68
  limit?: number;
69
+ /**
70
+ * Keyed reads (a first download, resumable and partitionable): return the
71
+ * records with an id after this one, ascending by id. Replaces `page`;
72
+ * the response carries `next` to continue from, null once the window is
73
+ * exhausted. `sort` is ignored in this mode — the order IS the position.
74
+ */
75
+ after?: string;
76
+ /**
77
+ * Keyed reads: the upper bound of a window, inclusive — a slice's last id
78
+ * from `GET /assets/partitions`. Several windows can be walked at once.
79
+ */
80
+ before?: string;
69
81
  sort?: AssetSortField;
70
82
  sortOrder?: SortOrders;
71
83
  embed?: Array<AssetEmbedField>;
@@ -3,4 +3,10 @@ import { GetAssetResponse } from '../[id]/get';
3
3
  export interface GetAssetsResponse {
4
4
  query: GetAssetsQuery | null;
5
5
  items: GetAssetResponse[];
6
+ /**
7
+ * Keyed reads only (`after`/`before` given): the id to continue from —
8
+ * the last item's — or null once the window is exhausted. Absent on a
9
+ * paged read.
10
+ */
11
+ next?: string | null;
6
12
  }
@@ -1,5 +1,6 @@
1
1
  export * from './[id]';
2
2
  export * from './count';
3
+ export * from './partitions';
3
4
  export * from './count-filtered';
4
5
  export * from './download';
5
6
  export * from './get';
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./[id]"), exports);
18
18
  __exportStar(require("./count"), exports);
19
+ __exportStar(require("./partitions"), exports);
19
20
  __exportStar(require("./count-filtered"), exports);
20
21
  __exportStar(require("./download"), exports);
21
22
  __exportStar(require("./get"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/assets/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAsB;AACtB,0CAAuB;AACvB,mDAAgC;AAChC,6CAA0B;AAC1B,wCAAqB;AACrB,6CAA0B;AAC1B,yCAAsB;AACtB,gDAA6B;AAC7B,2CAAwB;AACxB,2CAAwB;AACxB,4CAAyB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/assets/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAsB;AACtB,0CAAuB;AACvB,+CAA4B;AAC5B,mDAAgC;AAChC,6CAA0B;AAC1B,wCAAqB;AACrB,6CAA0B;AAC1B,yCAAsB;AACtB,gDAA6B;AAC7B,2CAAwB;AACxB,2CAAwB;AACxB,4CAAyB"}
@@ -0,0 +1,2 @@
1
+ export * from './query';
2
+ export * from './response';
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./query"), exports);
18
+ __exportStar(require("./response"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/assets/partitions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB;AACvB,6CAA0B"}
@@ -0,0 +1,9 @@
1
+ export interface GetAssetPartitionsQuery {
2
+ /**
3
+ * How many near-equal slices to split the caller's assets into, in id
4
+ * order. The response carries `parts − 1` boundary ids; a client walks
5
+ * each slice with `GET /assets?after=…&before=…` and can run them side by
6
+ * side. Default 4, at most 16.
7
+ */
8
+ parts?: number;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.js","sourceRoot":"","sources":["../../../src/assets/partitions/query.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ export interface GetAssetPartitionsResponse {
2
+ /**
3
+ * The last id of each slice but the last, ascending: `parts − 1` ids,
4
+ * fewer when there are not enough assets to fill every slice. Slice k
5
+ * runs from the previous boundary (exclusive; open for the first slice)
6
+ * up to and including boundary k (open for the last slice): walk it with
7
+ * `after` = the previous boundary and `before` = boundary k.
8
+ */
9
+ boundaries: string[];
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/assets/partitions/response.ts"],"names":[],"mappings":""}
@@ -4,6 +4,7 @@ export interface GetFieldResponse {
4
4
  id: string;
5
5
  name: string;
6
6
  dataType: FieldDataType;
7
+ /** Defaulted from `dataType` when not supplied at creation; can be changed later. */
7
8
  inputType?: FieldInputType;
8
9
  label?: string;
9
10
  required?: boolean;
@@ -5,6 +5,7 @@ export interface UpdateFieldRequestOption {
5
5
  previousValue?: string;
6
6
  }
7
7
  export interface UpdateFieldRequest {
8
+ /** Omit to keep the current input type; it cannot be cleared. */
8
9
  inputType?: FieldInputType;
9
10
  label?: string | null;
10
11
  required?: boolean;
@@ -2,6 +2,15 @@ export declare type FieldDataType = 'STRING' | 'INTEGER' | 'DECIMAL' | 'BOOLEAN'
2
2
  export declare const FIELD_DATA_TYPES: FieldDataType[];
3
3
  export declare type FieldInputType = 'SINGLELINE' | 'MULTILINE' | 'LINK' | 'RICHTEXT' | 'DROPDOWN' | 'RADIO' | 'CHECKBOXES' | 'DATE' | 'DATETIME' | 'INTEGER' | 'DECIMAL' | 'SWITCH';
4
4
  export declare const FIELD_INPUT_TYPES: FieldInputType[];
5
+ /**
6
+ * The input type a field gets when created without `inputType`: the plainest
7
+ * input for its data type (the Spotto client's own preset for a new field).
8
+ * One exception is applied by the API on top of this table: a `STRING` field
9
+ * created with `options` defaults to a `DROPDOWN`.
10
+ */
11
+ export declare const DEFAULT_FIELD_INPUT_TYPES: {
12
+ [key in FieldDataType]: FieldInputType;
13
+ };
5
14
  export declare type FieldSource = 'INPUT' | 'COMPUTED' | 'AGGREGATED';
6
15
  export declare const FIELD_SOURCES: FieldSource[];
7
16
  export declare type AggregateFunction = 'SUM' | 'AVG' | 'MIN' | 'MAX' | 'COUNT';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AGGREGATE_FUNCTIONS = exports.FIELD_SOURCES = exports.FIELD_INPUT_TYPES = exports.FIELD_DATA_TYPES = void 0;
3
+ exports.AGGREGATE_FUNCTIONS = exports.FIELD_SOURCES = exports.DEFAULT_FIELD_INPUT_TYPES = exports.FIELD_INPUT_TYPES = exports.FIELD_DATA_TYPES = void 0;
4
4
  const dataTypes = {
5
5
  STRING: null,
6
6
  INTEGER: null,
@@ -25,6 +25,20 @@ const inputTypes = {
25
25
  SWITCH: null,
26
26
  };
27
27
  exports.FIELD_INPUT_TYPES = Object.keys(inputTypes);
28
+ /**
29
+ * The input type a field gets when created without `inputType`: the plainest
30
+ * input for its data type (the Spotto client's own preset for a new field).
31
+ * One exception is applied by the API on top of this table: a `STRING` field
32
+ * created with `options` defaults to a `DROPDOWN`.
33
+ */
34
+ exports.DEFAULT_FIELD_INPUT_TYPES = {
35
+ STRING: 'SINGLELINE',
36
+ INTEGER: 'INTEGER',
37
+ DECIMAL: 'DECIMAL',
38
+ BOOLEAN: 'SWITCH',
39
+ DATE: 'DATE',
40
+ DATETIME: 'DATETIME',
41
+ };
28
42
  const fieldSources = {
29
43
  INPUT: null,
30
44
  COMPUTED: null,
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/fields/constants.ts"],"names":[],"mappings":";;;AAQA,MAAM,SAAS,GAAqC;IAClD,MAAM,EAAE,IAAI;IACZ,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,IAAI;IACb,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,IAAI;CACf,CAAA;AAEY,QAAA,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAoB,CAAA;AAgBzE,MAAM,UAAU,GAAsC;IACpD,UAAU,EAAE,IAAI;IAChB,SAAS,EAAE,IAAI;IACf,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,IAAI;IAChB,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,IAAI;IACb,MAAM,EAAE,IAAI;CACb,CAAA;AAEY,QAAA,iBAAiB,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAqB,CAAA;AAS5E,MAAM,YAAY,GAAmC;IACnD,KAAK,EAAE,IAAI;IACX,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE,IAAI;CACjB,CAAA;AAEY,QAAA,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,YAAY,CAAkB,CAAA;AAIvE,MAAM,kBAAkB,GAAyC;IAC/D,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,KAAK,EAAE,IAAI;CACZ,CAAA;AAEY,QAAA,mBAAmB,GAAG,MAAM,CAAC,IAAI,CAC5C,kBAAkB,CACI,CAAA"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/fields/constants.ts"],"names":[],"mappings":";;;AAQA,MAAM,SAAS,GAAqC;IAClD,MAAM,EAAE,IAAI;IACZ,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,IAAI;IACb,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,IAAI;CACf,CAAA;AAEY,QAAA,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAoB,CAAA;AAgBzE,MAAM,UAAU,GAAsC;IACpD,UAAU,EAAE,IAAI;IAChB,SAAS,EAAE,IAAI;IACf,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,IAAI;IAChB,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,IAAI;IACb,MAAM,EAAE,IAAI;CACb,CAAA;AAEY,QAAA,iBAAiB,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAqB,CAAA;AAE5E;;;;;GAKG;AACU,QAAA,yBAAyB,GAElC;IACF,MAAM,EAAE,YAAY;IACpB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,QAAQ;IACjB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;CACrB,CAAA;AASD,MAAM,YAAY,GAAmC;IACnD,KAAK,EAAE,IAAI;IACX,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE,IAAI;CACjB,CAAA;AAEY,QAAA,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,YAAY,CAAkB,CAAA;AAIvE,MAAM,kBAAkB,GAAyC;IAC/D,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,KAAK,EAAE,IAAI;CACZ,CAAA;AAEY,QAAA,mBAAmB,GAAG,MAAM,CAAC,IAAI,CAC5C,kBAAkB,CACI,CAAA"}
@@ -2,6 +2,10 @@ import { FieldDataType, FieldInputType } from '../constants';
2
2
  export interface PostFieldRequest {
3
3
  name: string;
4
4
  dataType: FieldDataType;
5
+ /**
6
+ * Optional — defaults to `DEFAULT_FIELD_INPUT_TYPES[dataType]`, or to
7
+ * `DROPDOWN` for a `STRING` field created with `options`.
8
+ */
5
9
  inputType?: FieldInputType;
6
10
  label?: string;
7
11
  required?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/fields/post/request.ts"],"names":[],"mappings":";;;AAuBA,QAAQ;AACK,QAAA,oBAAoB,GAAqB;IACpD,IAAI,EAAE,eAAe;IACrB,QAAQ,EAAE,QAAQ;CACnB,CAAA"}
1
+ {"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/fields/post/request.ts"],"names":[],"mappings":";;;AA2BA,QAAQ;AACK,QAAA,oBAAoB,GAAqB;IACpD,IAAI,EAAE,eAAe;IACrB,QAAQ,EAAE,QAAQ;CACnB,CAAA"}
@@ -241,6 +241,9 @@ export interface GetSnapshotsItem {
241
241
  fields?: ISnapshotFields;
242
242
  submitted?: number;
243
243
  created: number;
244
+ /** Attached when `embed=meta` was requested — the same block as
245
+ * `GetSnapshotResponse['meta']`. */
246
+ meta?: IEntityMeta;
244
247
  /** The manifest-check verdict this snapshot stamped — three-state, see
245
248
  * `GetSnapshotResponse['c_satisfiesManifest']`. Present on list rows so
246
249
  * the snapshot filters can ask it. */
@@ -1 +1 @@
1
- {"version":3,"file":"get.js","sourceRoot":"","sources":["../../../src/snapshots/[id]/get.ts"],"names":[],"mappings":";;;AAwRA,QAAQ;AACK,QAAA,sBAAsB,GAAwB;IACzD,EAAE,EAAE,OAAO;IACX,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE;QACR,EAAE,EAAE,YAAY;QAChB,IAAI,EAAE,cAAc;KACrB;IACD,QAAQ,EAAE;QACR,YAAY,EAAE,CAAC;QACf,cAAc,EAAE,CAAC;QACjB,YAAY,EAAE,CAAC;QACf,aAAa,EAAE;YACb,KAAK,EAAE,CAAC;YACR,iBAAiB,EAAE,CAAC;YACpB,YAAY,EAAE,CAAC;YACf,YAAY,EAAE,CAAC,EAAE,+EAA+E;YAChG,4GAA4G;SAC7G;QACD,cAAc,EAAE;YACd,KAAK,EAAE,CAAC;YACR,YAAY,EAAE,CAAC;YACf,YAAY,EAAE,CAAC,EAAE,+EAA+E;SACjG;QACD,UAAU,EAAE;YACV,UAAU,EAAE,CAAC;YACb,WAAW,EAAE,CAAC,EAAE,+DAA+D;SAChF;KACF;IACD,IAAI,EAAE,WAAW;CAClB,CAAA"}
1
+ {"version":3,"file":"get.js","sourceRoot":"","sources":["../../../src/snapshots/[id]/get.ts"],"names":[],"mappings":";;;AA2RA,QAAQ;AACK,QAAA,sBAAsB,GAAwB;IACzD,EAAE,EAAE,OAAO;IACX,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE;QACR,EAAE,EAAE,YAAY;QAChB,IAAI,EAAE,cAAc;KACrB;IACD,QAAQ,EAAE;QACR,YAAY,EAAE,CAAC;QACf,cAAc,EAAE,CAAC;QACjB,YAAY,EAAE,CAAC;QACf,aAAa,EAAE;YACb,KAAK,EAAE,CAAC;YACR,iBAAiB,EAAE,CAAC;YACpB,YAAY,EAAE,CAAC;YACf,YAAY,EAAE,CAAC,EAAE,+EAA+E;YAChG,4GAA4G;SAC7G;QACD,cAAc,EAAE;YACd,KAAK,EAAE,CAAC;YACR,YAAY,EAAE,CAAC;YACf,YAAY,EAAE,CAAC,EAAE,+EAA+E;SACjG;QACD,UAAU,EAAE;YACV,UAAU,EAAE,CAAC;YACb,WAAW,EAAE,CAAC,EAAE,+DAA+D;SAChF;KACF;IACD,IAAI,EAAE,WAAW;CAClB,CAAA"}
@@ -3,7 +3,13 @@ import { IActionAttachment, IActionAttachmentAll, IReadinessRule, IReadinessRule
3
3
  export interface UpdateTypeRequest {
4
4
  name?: string;
5
5
  parent?: string;
6
- fullNameTemplate?: string | null;
6
+ /**
7
+ * Display-name template (`@name` / `@parent`). Omit to keep the current one;
8
+ * it cannot be cleared (`null` is rejected). A change regenerates `fullName`,
9
+ * which updates `typeName` and any generated asset names (manually named
10
+ * assets keep their name).
11
+ */
12
+ fullNameTemplate?: string;
7
13
  description?: string;
8
14
  path?: string;
9
15
  fields?: IFieldBinding[];
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The template a type gets when created without `fullNameTemplate`: its
3
+ * `fullName` is just its own name.
4
+ *
5
+ * Templates substitute `@name` (the type's name) and `@parent` (the parent's
6
+ * full name); use `@parent @name` when sibling names repeat across branches so
7
+ * generated asset names stay distinguishable.
8
+ */
9
+ export declare const DEFAULT_FULL_NAME_TEMPLATE = "@name";
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DEFAULT_FULL_NAME_TEMPLATE = void 0;
4
+ /**
5
+ * The template a type gets when created without `fullNameTemplate`: its
6
+ * `fullName` is just its own name.
7
+ *
8
+ * Templates substitute `@name` (the type's name) and `@parent` (the parent's
9
+ * full name); use `@parent @name` when sibling names repeat across branches so
10
+ * generated asset names stay distinguishable.
11
+ */
12
+ exports.DEFAULT_FULL_NAME_TEMPLATE = '@name';
13
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/types/constants.ts"],"names":[],"mappings":";;;AAAA;;;;;;;GAOG;AACU,QAAA,0BAA0B,GAAG,OAAO,CAAA"}
@@ -3,3 +3,4 @@ export * from './get';
3
3
  export * from './hierarchy';
4
4
  export * from './post';
5
5
  export * from './suggestions';
6
+ export * from './constants';
@@ -19,4 +19,5 @@ __exportStar(require("./get"), exports);
19
19
  __exportStar(require("./hierarchy"), exports);
20
20
  __exportStar(require("./post"), exports);
21
21
  __exportStar(require("./suggestions"), exports);
22
+ __exportStar(require("./constants"), exports);
22
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAsB;AACtB,wCAAqB;AACrB,8CAA2B;AAC3B,yCAAsB;AACtB,gDAA6B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAsB;AACtB,wCAAqB;AACrB,8CAA2B;AAC3B,yCAAsB;AACtB,gDAA6B;AAC7B,8CAA2B"}
@@ -80,7 +80,11 @@ export declare type IFieldValueWithConstraints = IdOrName & {
80
80
  export interface PostTypeRequest {
81
81
  name: string;
82
82
  parent?: string;
83
- fullNameTemplate?: string | null;
83
+ /**
84
+ * Display-name template (`@name` / `@parent`). Optional — the server stamps
85
+ * `DEFAULT_FULL_NAME_TEMPLATE` (`@name`) when omitted; `null` is rejected.
86
+ */
87
+ fullNameTemplate?: string;
84
88
  description?: string;
85
89
  path?: string;
86
90
  fields?: IFieldBinding[];
@@ -1 +1 @@
1
- {"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/types/post/request.ts"],"names":[],"mappings":";;;AA0GA,QAAQ;AACK,QAAA,mBAAmB,GAAoB;IAClD,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,MAAM;IACZ,gBAAgB,EAAE,OAAO;IACzB,MAAM,EAAE;QACN;YACE,EAAE,EAAE,QAAQ;YACZ,IAAI,EAAE,QAAQ;SACf;KACF;IACD,eAAe,EAAE;QACf;YACE,gBAAgB;YAChB,IAAI,EAAE,QAAQ;YACd,YAAY,EAAE,IAAI;YAClB,oBAAoB;SACrB;KACF;IACD,iBAAiB,EAAE,IAAI;CACxB,CAAA"}
1
+ {"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/types/post/request.ts"],"names":[],"mappings":";;;AA8GA,QAAQ;AACK,QAAA,mBAAmB,GAAoB;IAClD,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,MAAM;IACZ,gBAAgB,EAAE,OAAO;IACzB,MAAM,EAAE;QACN;YACE,EAAE,EAAE,QAAQ;YACZ,IAAI,EAAE,QAAQ;SACf;KACF;IACD,eAAe,EAAE;QACf;YACE,gBAAgB;YAChB,IAAI,EAAE,QAAQ;YACd,YAAY,EAAE,IAAI;YAClB,oBAAoB;SACrB;KACF;IACD,iBAAiB,EAAE,IAAI;CACxB,CAAA"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Which Spotto console an emailed link should open.
3
+ *
4
+ * Sent by the NEXT console (g2g-client) on the endpoints that email a link
5
+ * (`POST /users` for the invitation, `POST /users/forgot-password` for the
6
+ * reset). Absent ⇒ the legacy console for the organisation's tenant — the
7
+ * behaviour every existing caller already gets, so the legacy console sends
8
+ * nothing and is unaffected.
9
+ *
10
+ * When set, the tenant is deliberately NOT consulted: a request from the new
11
+ * console always wants the new console's branding and host, whatever tenant
12
+ * the organisation carries. The spotto/g2g split is being retired.
13
+ */
14
+ export declare type ConsoleTarget = 'next';
15
+ export declare const CONSOLE_TARGETS: ConsoleTarget[];
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CONSOLE_TARGETS = void 0;
4
+ exports.CONSOLE_TARGETS = ['next'];
5
+ //# sourceMappingURL=console.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"console.js","sourceRoot":"","sources":["../../src/users/console.ts"],"names":[],"mappings":";;;AAea,QAAA,eAAe,GAAoB,CAAC,MAAM,CAAC,CAAA"}
@@ -1,4 +1,5 @@
1
1
  export * from './constants';
2
+ export * from './console';
2
3
  export * from './current';
3
4
  export * from './home-layout';
4
5
  export * from './post';
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./constants"), exports);
18
+ __exportStar(require("./console"), exports);
18
19
  __exportStar(require("./current"), exports);
19
20
  __exportStar(require("./home-layout"), exports);
20
21
  __exportStar(require("./post"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/users/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B;AAC3B,4CAAyB;AACzB,gDAA6B;AAC7B,yCAAsB;AACtB,wCAAqB;AACrB,yCAAsB;AACtB,4CAAyB;AACzB,mDAAgC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/users/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B;AAC3B,4CAAyB;AACzB,4CAAyB;AACzB,gDAA6B;AAC7B,yCAAsB;AACtB,wCAAqB;AACrB,yCAAsB;AACtB,4CAAyB;AACzB,mDAAgC"}
@@ -1,11 +1,18 @@
1
+ import { ConsoleTarget } from './console';
1
2
  /**
2
3
  * Request shape for `POST /users/forgot-password`. The email is the only
3
4
  * identifier we need; we don't take a return URL or any user-controlled
4
5
  * routing — the link in the email points at a fixed `/reset-password`
5
- * path resolved server-side from the org's tenant.
6
+ * path on a console chosen server-side: the legacy console for the org's
7
+ * tenant, or the new console when `console: 'next'` is sent.
6
8
  */
7
9
  export interface RequestPasswordResetRequest {
8
10
  email: string;
11
+ /**
12
+ * Which console the reset link opens. Omit for the legacy console
13
+ * matching the account's tenant. See `ConsoleTarget`.
14
+ */
15
+ console?: ConsoleTarget;
9
16
  }
10
17
  /**
11
18
  * Response shape for `POST /users/forgot-password`. Always empty, always
@@ -1,3 +1,4 @@
1
+ import { ConsoleTarget } from '../console';
1
2
  export interface BasePostUserRequest {
2
3
  name: string;
3
4
  role: string;
@@ -15,5 +16,10 @@ export interface PostExternalUserRequest extends BasePostUserRequest {
15
16
  export interface PostInternalUserRequest extends BasePostUserRequest {
16
17
  type: 'INTERNAL';
17
18
  email: string;
19
+ /**
20
+ * Which console the invitation link opens. Omit for the legacy console
21
+ * matching the organisation's tenant. See `ConsoleTarget`.
22
+ */
23
+ console?: ConsoleTarget;
18
24
  }
19
25
  export declare type PostUserRequest = PostExternalUserRequest | PostInternalUserRequest;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@spotto/contract",
3
3
  "license": "ISC",
4
- "version": "1.0.70-alpha.31",
4
+ "version": "1.0.70-alpha.32",
5
5
  "description": "Spotto's API Contract type definitions",
6
6
  "main": "./dist/index.js",
7
7
  "files": [
@@ -18,5 +18,5 @@
18
18
  "@types/geojson": "^7946.0.11",
19
19
  "shx": "^0.3.4"
20
20
  },
21
- "gitHead": "2f2d0cfd5dc8390336198bc9c5d58119df51f908"
21
+ "gitHead": "0994c729d0b079557ad5b9ff20534b5f630bcfa5"
22
22
  }