@mindline/sync 1.0.45 → 1.0.46

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/.vs/slnx.sqlite CHANGED
Binary file
Binary file
package/hybridspa.ts CHANGED
@@ -759,8 +759,25 @@ export async function tenantPut(
759
759
  let tenantEndpoint: string = graphConfig.tenantEndpoint;
760
760
  // create tenant headers
761
761
  const headers = await defineHeaders(instance, authorizedUser);
762
+ // establish read and write service principals ("notassigned" is default")
763
+ let readServicePrincipal: string = "null";
764
+ let writeServicePrincipal: string = "null";
765
+ if (tenant.permissionType == "write") {
766
+ writeServicePrincipal = `"1"`;
767
+ }
768
+ else if (tenant.permissionType == "read") {
769
+ readServicePrincipal = `"1"`;
770
+ }
762
771
  // create tenant body
763
- let tenantBody: string = `{"tenantId": "${tenant.tid}"}`;
772
+ let tenantBody: string = `{"tenantId": "${tenant.tid}",
773
+ "name": "${tenant.name}",
774
+ "domain": "${tenant.domain}",
775
+ "type": "${tenant.tenantType}",
776
+ "permissionType": "${tenant.permissionType}",
777
+ "isOnboarded": ${tenant.onboarded == "true"},
778
+ "authority": "${tenant.authority}",
779
+ "readServicePrincipal": ${readServicePrincipal},
780
+ "writeServicePrincipal": ${writeServicePrincipal}}`;
764
781
  let options = { method: "PUT", headers: headers, body: tenantBody };
765
782
  // make tenant endpoint call
766
783
  try {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mindline/sync",
3
3
  "type": "module",
4
- "version": "1.0.45",
4
+ "version": "1.0.46",
5
5
  "types": "index.d.ts",
6
6
  "exports": "./index.ts",
7
7
  "description": "sync is a node.js package encapsulating javscript classes required for configuring Mindline sync service.",