@cellaware/utils 8.8.3 → 8.8.5
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.
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export declare const CHATWMS_DATABASE_ID = "chatwms";
|
|
2
2
|
export declare const CLIENT_PARTITION_KEY = "/clientId";
|
|
3
3
|
export declare const PRODUCT_PARTITION_KEY = "/productId";
|
|
4
|
+
export declare const COSMOS_SYSTEM_FIELDS: string[];
|
|
5
|
+
export declare function stripCosmosSystemFields(obj: any): any;
|
|
4
6
|
/**
|
|
5
7
|
* Default `partitionKey` is '/clientId'
|
|
6
8
|
*/
|
|
@@ -4,6 +4,13 @@ const PARTITION_KEY = '/clientId';
|
|
|
4
4
|
export const CHATWMS_DATABASE_ID = DATABASE_ID;
|
|
5
5
|
export const CLIENT_PARTITION_KEY = PARTITION_KEY;
|
|
6
6
|
export const PRODUCT_PARTITION_KEY = '/productId';
|
|
7
|
+
export const COSMOS_SYSTEM_FIELDS = ['id', '_rid', '_self', '_etag', '_attachments', '_ts'];
|
|
8
|
+
export function stripCosmosSystemFields(obj) {
|
|
9
|
+
for (const field of COSMOS_SYSTEM_FIELDS) {
|
|
10
|
+
delete obj[field];
|
|
11
|
+
}
|
|
12
|
+
return obj;
|
|
13
|
+
}
|
|
7
14
|
/**
|
|
8
15
|
* Default `partitionKey` is '/clientId'
|
|
9
16
|
*/
|