@nurama/types 1.4.7 → 1.4.9
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.
- package/dist/asset.d.ts +30 -3
- package/dist/convo.d.ts +7 -3
- package/dist/device.d.ts +8 -0
- package/dist/project.d.ts +6 -0
- package/package.json +1 -1
- package/src/asset.ts +39 -3
- package/src/convo.ts +7 -3
- package/src/device.ts +8 -0
- package/src/project.ts +6 -0
package/dist/asset.d.ts
CHANGED
|
@@ -138,9 +138,10 @@ export interface Asset {
|
|
|
138
138
|
originalSizeInBytes?: number | null;
|
|
139
139
|
/**
|
|
140
140
|
* Where the original file is: `stored` while it is in storage, otherwise
|
|
141
|
-
* pruned or in transition.
|
|
141
|
+
* pruned or in transition. `restoring`: a pruned original is being
|
|
142
|
+
* re-attached — uploaded, or verified against its recorded hash.
|
|
142
143
|
*/
|
|
143
|
-
originalState?: 'stored' | 'pruneRequested' | 'pruning' | 'pruned' | 'restoring'
|
|
144
|
+
originalState?: 'stored' | 'pruneRequested' | 'pruning' | 'pruned' | 'restoring';
|
|
144
145
|
/**
|
|
145
146
|
* When post-processing finished (Unix ms), or null while it is running or
|
|
146
147
|
* has not run.
|
|
@@ -163,6 +164,12 @@ export interface Asset {
|
|
|
163
164
|
pruneAttempts?: number;
|
|
164
165
|
/** Why the last prune attempt failed, or why the policy set the asset aside. */
|
|
165
166
|
pruneError?: string | null;
|
|
167
|
+
/** While `restoring`, when the re-attach upload was started (Unix ms). */
|
|
168
|
+
reattachStartedAt?: number | null;
|
|
169
|
+
/** While `restoring`, who started the re-attach. */
|
|
170
|
+
reattachById?: string | null;
|
|
171
|
+
/** While `restoring`, the upload the file is arriving through; null once it is being verified. */
|
|
172
|
+
reattachUploadId?: string | null;
|
|
166
173
|
/**
|
|
167
174
|
* The name of the asset used on the platform.
|
|
168
175
|
*/
|
|
@@ -539,6 +546,12 @@ export interface AssetOriginalStatus {
|
|
|
539
546
|
originalExtension: string | null;
|
|
540
547
|
originalSizeInBytes: number | null;
|
|
541
548
|
processingCompletedAt: number | null;
|
|
549
|
+
/** While `restoring`, how far the re-attach has got. Optional for older servers. */
|
|
550
|
+
reattach?: {
|
|
551
|
+
phase: 'uploading' | 'verifying';
|
|
552
|
+
startedAt: number | null;
|
|
553
|
+
startedById: string | null;
|
|
554
|
+
} | null;
|
|
542
555
|
eligibility: AssetPruneEligibility;
|
|
543
556
|
policy: {
|
|
544
557
|
enabled: boolean;
|
|
@@ -562,7 +575,7 @@ export interface AssetOriginalStatus {
|
|
|
562
575
|
export interface AssetOriginalHistoryEntry {
|
|
563
576
|
id: string;
|
|
564
577
|
assetId: string;
|
|
565
|
-
action: 'hashed' | 'pruneRequested' | 'pruneCancelled' | 'pruned' | 'pruneFailed' | 'keepOriginalSet' | 'keepOriginalCleared';
|
|
578
|
+
action: 'hashed' | 'pruneRequested' | 'pruneCancelled' | 'pruned' | 'pruneFailed' | 'keepOriginalSet' | 'keepOriginalCleared' | 'reattachStarted' | 'reattached' | 'reattachRejected' | 'reattachCancelled' | 'reattachFailed';
|
|
566
579
|
/** Who acted; null when the system did. */
|
|
567
580
|
actor: {
|
|
568
581
|
id: string;
|
|
@@ -576,6 +589,19 @@ export interface AssetOriginalHistoryEntry {
|
|
|
576
589
|
note: string | null;
|
|
577
590
|
createdAt: number;
|
|
578
591
|
}
|
|
592
|
+
/** From `POST /v1/assets/:assetId/original/reattach`: the asset, now `restoring`, and where to upload. */
|
|
593
|
+
export interface AssetOriginalReattachStart {
|
|
594
|
+
asset: Asset;
|
|
595
|
+
upload: {
|
|
596
|
+
uploadId: string;
|
|
597
|
+
key: string;
|
|
598
|
+
/** PUT part N of the file to `urls[N - 1]`. */
|
|
599
|
+
urls: string[];
|
|
600
|
+
/** When the links expire (Unix seconds). */
|
|
601
|
+
expires: number;
|
|
602
|
+
uploadChunkSizeInBytes: number;
|
|
603
|
+
};
|
|
604
|
+
}
|
|
579
605
|
/**
|
|
580
606
|
* Assets a bulk prune request acts on: ids, paths in the project's creator
|
|
581
607
|
* tree (a folder includes everything inside it), or both.
|
|
@@ -625,6 +651,7 @@ export interface ProjectPruningSummary {
|
|
|
625
651
|
graceDays: number;
|
|
626
652
|
skipPublished: boolean;
|
|
627
653
|
skipInSubmissions: boolean;
|
|
654
|
+
reattachMatchingUploads: boolean;
|
|
628
655
|
};
|
|
629
656
|
/** Active media assets by `originalState`. */
|
|
630
657
|
counts: Record<string, number>;
|
package/dist/convo.d.ts
CHANGED
|
@@ -108,9 +108,13 @@ export interface StartConvoRequest {
|
|
|
108
108
|
recordingEnabled?: boolean;
|
|
109
109
|
transcriptionEnabled?: boolean;
|
|
110
110
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
111
|
+
/**
|
|
112
|
+
* `POST /v1/convos` answers with the convo itself (not wrapped in `convo`)
|
|
113
|
+
* plus the starter's Daily meeting token.
|
|
114
|
+
*/
|
|
115
|
+
export type StartConvoResponse = Convo & {
|
|
116
|
+
meetingToken: string;
|
|
117
|
+
};
|
|
114
118
|
export interface UpdateConvoRequest {
|
|
115
119
|
subject?: string;
|
|
116
120
|
notes?: string;
|
package/dist/device.d.ts
CHANGED
|
@@ -44,6 +44,8 @@ export interface Device {
|
|
|
44
44
|
voipPushToken?: string | null;
|
|
45
45
|
/** App bundle identifier (e.g., com.nurama.mobile.beta) */
|
|
46
46
|
bundleId?: string | null;
|
|
47
|
+
/** Stable id of the install this device row stands for, when the client sends one */
|
|
48
|
+
installationId?: string | null;
|
|
47
49
|
/** Optional device metadata */
|
|
48
50
|
deviceInfo?: DeviceInfo;
|
|
49
51
|
/** Device status */
|
|
@@ -69,6 +71,12 @@ export interface RegisterDeviceBody {
|
|
|
69
71
|
voipPushToken?: string;
|
|
70
72
|
/** App bundle identifier (e.g., com.nurama.mobile.beta) */
|
|
71
73
|
bundleId?: string;
|
|
74
|
+
/**
|
|
75
|
+
* A random id the client generates once and keeps for the life of the
|
|
76
|
+
* install (8–100 of `A-Z a-z 0-9 _ -`). A new push token from the same
|
|
77
|
+
* install updates that device instead of registering another.
|
|
78
|
+
*/
|
|
79
|
+
installationId?: string;
|
|
72
80
|
/** Optional device metadata */
|
|
73
81
|
deviceInfo?: DeviceInfo;
|
|
74
82
|
}
|
package/dist/project.d.ts
CHANGED
|
@@ -34,6 +34,12 @@ export interface OriginalPruningPolicy {
|
|
|
34
34
|
skipPublished?: boolean;
|
|
35
35
|
/** Leave alone assets included in a submission (default true). */
|
|
36
36
|
skipInSubmissions?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Take an ordinary upload that matches a pruned asset as a re-attach of its
|
|
39
|
+
* original, rather than a duplicate of the asset (default false). Applies
|
|
40
|
+
* whether or not automatic pruning is on.
|
|
41
|
+
*/
|
|
42
|
+
reattachMatchingUploads?: boolean;
|
|
37
43
|
}
|
|
38
44
|
/**
|
|
39
45
|
* Represents a project within a workspace.
|
package/package.json
CHANGED
package/src/asset.ts
CHANGED
|
@@ -149,9 +149,10 @@ export interface Asset {
|
|
|
149
149
|
originalSizeInBytes?: number | null;
|
|
150
150
|
/**
|
|
151
151
|
* Where the original file is: `stored` while it is in storage, otherwise
|
|
152
|
-
* pruned or in transition.
|
|
152
|
+
* pruned or in transition. `restoring`: a pruned original is being
|
|
153
|
+
* re-attached — uploaded, or verified against its recorded hash.
|
|
153
154
|
*/
|
|
154
|
-
originalState?: 'stored' | 'pruneRequested' | 'pruning' | 'pruned' | 'restoring'
|
|
155
|
+
originalState?: 'stored' | 'pruneRequested' | 'pruning' | 'pruned' | 'restoring';
|
|
155
156
|
/**
|
|
156
157
|
* When post-processing finished (Unix ms), or null while it is running or
|
|
157
158
|
* has not run.
|
|
@@ -174,6 +175,12 @@ export interface Asset {
|
|
|
174
175
|
pruneAttempts?: number;
|
|
175
176
|
/** Why the last prune attempt failed, or why the policy set the asset aside. */
|
|
176
177
|
pruneError?: string | null;
|
|
178
|
+
/** While `restoring`, when the re-attach upload was started (Unix ms). */
|
|
179
|
+
reattachStartedAt?: number | null;
|
|
180
|
+
/** While `restoring`, who started the re-attach. */
|
|
181
|
+
reattachById?: string | null;
|
|
182
|
+
/** While `restoring`, the upload the file is arriving through; null once it is being verified. */
|
|
183
|
+
reattachUploadId?: string | null;
|
|
177
184
|
/**
|
|
178
185
|
* The name of the asset used on the platform.
|
|
179
186
|
*/
|
|
@@ -563,6 +570,8 @@ export interface AssetOriginalStatus {
|
|
|
563
570
|
originalExtension: string | null;
|
|
564
571
|
originalSizeInBytes: number | null;
|
|
565
572
|
processingCompletedAt: number | null;
|
|
573
|
+
/** While `restoring`, how far the re-attach has got. Optional for older servers. */
|
|
574
|
+
reattach?: { phase: 'uploading' | 'verifying'; startedAt: number | null; startedById: string | null } | null;
|
|
566
575
|
eligibility: AssetPruneEligibility;
|
|
567
576
|
policy: {
|
|
568
577
|
enabled: boolean;
|
|
@@ -587,7 +596,19 @@ export interface AssetOriginalStatus {
|
|
|
587
596
|
export interface AssetOriginalHistoryEntry {
|
|
588
597
|
id: string;
|
|
589
598
|
assetId: string;
|
|
590
|
-
action:
|
|
599
|
+
action:
|
|
600
|
+
| 'hashed'
|
|
601
|
+
| 'pruneRequested'
|
|
602
|
+
| 'pruneCancelled'
|
|
603
|
+
| 'pruned'
|
|
604
|
+
| 'pruneFailed'
|
|
605
|
+
| 'keepOriginalSet'
|
|
606
|
+
| 'keepOriginalCleared'
|
|
607
|
+
| 'reattachStarted'
|
|
608
|
+
| 'reattached'
|
|
609
|
+
| 'reattachRejected'
|
|
610
|
+
| 'reattachCancelled'
|
|
611
|
+
| 'reattachFailed';
|
|
591
612
|
/** Who acted; null when the system did. */
|
|
592
613
|
actor: { id: string; displayName: string | null } | null;
|
|
593
614
|
sha256: string | null;
|
|
@@ -599,6 +620,20 @@ export interface AssetOriginalHistoryEntry {
|
|
|
599
620
|
createdAt: number;
|
|
600
621
|
}
|
|
601
622
|
|
|
623
|
+
/** From `POST /v1/assets/:assetId/original/reattach`: the asset, now `restoring`, and where to upload. */
|
|
624
|
+
export interface AssetOriginalReattachStart {
|
|
625
|
+
asset: Asset;
|
|
626
|
+
upload: {
|
|
627
|
+
uploadId: string;
|
|
628
|
+
key: string;
|
|
629
|
+
/** PUT part N of the file to `urls[N - 1]`. */
|
|
630
|
+
urls: string[];
|
|
631
|
+
/** When the links expire (Unix seconds). */
|
|
632
|
+
expires: number;
|
|
633
|
+
uploadChunkSizeInBytes: number;
|
|
634
|
+
};
|
|
635
|
+
}
|
|
636
|
+
|
|
602
637
|
/**
|
|
603
638
|
* Assets a bulk prune request acts on: ids, paths in the project's creator
|
|
604
639
|
* tree (a folder includes everything inside it), or both.
|
|
@@ -639,6 +674,7 @@ export interface ProjectPruningSummary {
|
|
|
639
674
|
graceDays: number;
|
|
640
675
|
skipPublished: boolean;
|
|
641
676
|
skipInSubmissions: boolean;
|
|
677
|
+
reattachMatchingUploads: boolean;
|
|
642
678
|
};
|
|
643
679
|
/** Active media assets by `originalState`. */
|
|
644
680
|
counts: Record<string, number>;
|
package/src/convo.ts
CHANGED
|
@@ -139,9 +139,13 @@ export interface StartConvoRequest {
|
|
|
139
139
|
transcriptionEnabled?: boolean;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
142
|
+
/**
|
|
143
|
+
* `POST /v1/convos` answers with the convo itself (not wrapped in `convo`)
|
|
144
|
+
* plus the starter's Daily meeting token.
|
|
145
|
+
*/
|
|
146
|
+
export type StartConvoResponse = Convo & {
|
|
147
|
+
meetingToken: string;
|
|
148
|
+
};
|
|
145
149
|
|
|
146
150
|
export interface UpdateConvoRequest {
|
|
147
151
|
subject?: string;
|
package/src/device.ts
CHANGED
|
@@ -49,6 +49,8 @@ export interface Device {
|
|
|
49
49
|
voipPushToken?: string | null;
|
|
50
50
|
/** App bundle identifier (e.g., com.nurama.mobile.beta) */
|
|
51
51
|
bundleId?: string | null;
|
|
52
|
+
/** Stable id of the install this device row stands for, when the client sends one */
|
|
53
|
+
installationId?: string | null;
|
|
52
54
|
/** Optional device metadata */
|
|
53
55
|
deviceInfo?: DeviceInfo;
|
|
54
56
|
/** Device status */
|
|
@@ -75,6 +77,12 @@ export interface RegisterDeviceBody {
|
|
|
75
77
|
voipPushToken?: string;
|
|
76
78
|
/** App bundle identifier (e.g., com.nurama.mobile.beta) */
|
|
77
79
|
bundleId?: string;
|
|
80
|
+
/**
|
|
81
|
+
* A random id the client generates once and keeps for the life of the
|
|
82
|
+
* install (8–100 of `A-Z a-z 0-9 _ -`). A new push token from the same
|
|
83
|
+
* install updates that device instead of registering another.
|
|
84
|
+
*/
|
|
85
|
+
installationId?: string;
|
|
78
86
|
/** Optional device metadata */
|
|
79
87
|
deviceInfo?: DeviceInfo;
|
|
80
88
|
}
|
package/src/project.ts
CHANGED
|
@@ -36,6 +36,12 @@ export interface OriginalPruningPolicy {
|
|
|
36
36
|
skipPublished?: boolean;
|
|
37
37
|
/** Leave alone assets included in a submission (default true). */
|
|
38
38
|
skipInSubmissions?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Take an ordinary upload that matches a pruned asset as a re-attach of its
|
|
41
|
+
* original, rather than a duplicate of the asset (default false). Applies
|
|
42
|
+
* whether or not automatic pruning is on.
|
|
43
|
+
*/
|
|
44
|
+
reattachMatchingUploads?: boolean;
|
|
39
45
|
}
|
|
40
46
|
|
|
41
47
|
/**
|