@overmap-ai/core 1.0.51-qr-field.0 → 1.0.52

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.
@@ -5,17 +5,18 @@ import { Marker } from "./geo";
5
5
  import { CreatedUserForm, SubmittedUserForm, UserForm } from "./forms";
6
6
  import { User } from "./users";
7
7
  import { CSSColor } from "../colors";
8
+ import { CreatedDocument, SubmittedDocument } from "./documents";
8
9
  /**
9
10
  * Represents a model instance that has been submitted to the backend. Some properties (depending on which model, but in
10
11
  * all cases, the `offline_id`) are guaranteed to be set.
11
12
  */
12
- export type Submitted<TModel> = Offline<TModel> & (TModel extends Issue ? SubmittedIssue : TModel extends UserForm ? SubmittedUserForm : Omit<TModel, "created_at" | "created_by" | "id">);
13
+ export type Submitted<TModel> = Offline<TModel> & (TModel extends Issue ? SubmittedIssue : TModel extends UserForm ? SubmittedUserForm : TModel extends Document ? SubmittedDocument : Omit<TModel, "created_at" | "created_by" | "id">);
13
14
  /**
14
15
  * Represents a model instance that has been submitted to the backend, accepted, then downloaded. Created models
15
16
  * typically have additional properties that are only known once it has been processed and accepted by the API, such as
16
17
  * the `created_at` timestamp, which is the time at which the data was written to the database.
17
18
  */
18
- export type Created<TModel> = Submitted<TModel> & (TModel extends Issue ? CreatedIssue : TModel extends IssueComment ? CreatedIssueComment : TModel extends UserForm ? CreatedUserForm : TModel);
19
+ export type Created<TModel> = Submitted<TModel> & (TModel extends Issue ? CreatedIssue : TModel extends IssueComment ? CreatedIssueComment : TModel extends UserForm ? CreatedUserForm : TModel extends Document ? CreatedDocument : TModel);
19
20
  /**
20
21
  * Model instances that are stored in the Redux store can be already-created (and will likely be gotten with the initial
21
22
  * data load), or to-be-created. In the former case, you will get a `Created<TModel>`. In the latter case, you will get
@@ -0,0 +1,10 @@
1
+ import { IconModel, OfflineModel, Payload, SubmittedAtModel } from "./base";
2
+ import { Organization } from "./organizations";
3
+ import { User } from "./users";
4
+ export interface Team extends OfflineModel, SubmittedAtModel, IconModel {
5
+ name: string;
6
+ parent: OfflineModel["offline_id"] | null;
7
+ organization: Organization["id"];
8
+ members: User["id"][];
9
+ }
10
+ export type TeamPayload = Omit<Payload<Team>, "organization" | "submitted_at">;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Core functionality for Overmap",
4
4
  "author": "Wôrdn Inc.",
5
5
  "license": "UNLICENSED",
6
- "version": "1.0.51-qr-field.0",
6
+ "version": "1.0.52",
7
7
  "type": "module",
8
8
  "main": "dist/overmap-core.umd.cjs",
9
9
  "module": "dist/overmap-core.js",