@greensecurity/javascript-sdk 0.44.0-beta.15 → 0.44.0-beta.17
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/README.md +9 -0
- package/dist/commonjs/__tests__/organizations.test.js +72 -6
- package/dist/commonjs/__tests__/organizations.test.js.map +1 -1
- package/dist/commonjs/__tests__/webhooks.test.js +1 -1
- package/dist/commonjs/__tests__/webhooks.test.js.map +1 -1
- package/dist/commonjs/__tests__/zones.test.js +34 -6
- package/dist/commonjs/__tests__/zones.test.js.map +1 -1
- package/dist/commonjs/funcs/organizationsCreateCompanyTargetFacility.d.ts +34 -0
- package/dist/commonjs/funcs/organizationsCreateCompanyTargetFacility.d.ts.map +1 -0
- package/dist/commonjs/funcs/organizationsCreateCompanyTargetFacility.js +145 -0
- package/dist/commonjs/funcs/organizationsCreateCompanyTargetFacility.js.map +1 -0
- package/dist/commonjs/funcs/organizationsDeleteCompanyTargetFacility.d.ts +28 -0
- package/dist/commonjs/funcs/organizationsDeleteCompanyTargetFacility.d.ts.map +1 -0
- package/dist/commonjs/funcs/organizationsDeleteCompanyTargetFacility.js +138 -0
- package/dist/commonjs/funcs/organizationsDeleteCompanyTargetFacility.js.map +1 -0
- package/dist/commonjs/funcs/organizationsListCompanyTargetFacilities.d.ts +42 -0
- package/dist/commonjs/funcs/organizationsListCompanyTargetFacilities.d.ts.map +1 -0
- package/dist/commonjs/funcs/organizationsListCompanyTargetFacilities.js +194 -0
- package/dist/commonjs/funcs/organizationsListCompanyTargetFacilities.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/models/components/companytargetfacility.d.ts +54 -0
- package/dist/commonjs/models/components/companytargetfacility.d.ts.map +1 -0
- package/dist/commonjs/models/components/companytargetfacility.js +80 -0
- package/dist/commonjs/models/components/companytargetfacility.js.map +1 -0
- package/dist/commonjs/models/components/index.d.ts +1 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +1 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/operations/createcompanytargetfacility.d.ts +50 -0
- package/dist/commonjs/models/operations/createcompanytargetfacility.d.ts.map +1 -0
- package/dist/commonjs/models/operations/createcompanytargetfacility.js +84 -0
- package/dist/commonjs/models/operations/createcompanytargetfacility.js.map +1 -0
- package/dist/commonjs/models/operations/deletecompanytargetfacility.d.ts +20 -0
- package/dist/commonjs/models/operations/deletecompanytargetfacility.d.ts.map +1 -0
- package/dist/commonjs/models/operations/deletecompanytargetfacility.js +55 -0
- package/dist/commonjs/models/operations/deletecompanytargetfacility.js.map +1 -0
- package/dist/commonjs/models/operations/exportcompanytargetfacilities.d.ts +16 -16
- package/dist/commonjs/models/operations/exportcompanytargetfacilities.d.ts.map +1 -1
- package/dist/commonjs/models/operations/exportcompanytargetfacilities.js +14 -15
- package/dist/commonjs/models/operations/exportcompanytargetfacilities.js.map +1 -1
- package/dist/commonjs/models/operations/index.d.ts +3 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +3 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listcompanytargetfacilities.d.ts +173 -0
- package/dist/commonjs/models/operations/listcompanytargetfacilities.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listcompanytargetfacilities.js +150 -0
- package/dist/commonjs/models/operations/listcompanytargetfacilities.js.map +1 -0
- package/dist/commonjs/models/operations/listfacilityvendors.d.ts +4 -4
- package/dist/commonjs/models/operations/listfacilityvendors.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listfacilityvendors.js +4 -4
- package/dist/commonjs/models/operations/listfacilityvendors.js.map +1 -1
- package/dist/commonjs/react-query/index.d.ts +3 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +3 -0
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/react-query/organizationsCreateCompanyTargetFacility.d.ts +43 -0
- package/dist/commonjs/react-query/organizationsCreateCompanyTargetFacility.d.ts.map +1 -0
- package/dist/commonjs/react-query/organizationsCreateCompanyTargetFacility.js +65 -0
- package/dist/commonjs/react-query/organizationsCreateCompanyTargetFacility.js.map +1 -0
- package/dist/commonjs/react-query/organizationsDeleteCompanyTargetFacility.d.ts +37 -0
- package/dist/commonjs/react-query/organizationsDeleteCompanyTargetFacility.d.ts.map +1 -0
- package/dist/commonjs/react-query/organizationsDeleteCompanyTargetFacility.js +59 -0
- package/dist/commonjs/react-query/organizationsDeleteCompanyTargetFacility.js.map +1 -0
- package/dist/commonjs/react-query/organizationsExportCompanyTargetFacilities.core.d.ts +4 -4
- package/dist/commonjs/react-query/organizationsExportCompanyTargetFacilities.core.d.ts.map +1 -1
- package/dist/commonjs/react-query/organizationsExportCompanyTargetFacilities.core.js.map +1 -1
- package/dist/commonjs/react-query/organizationsExportCompanyTargetFacilities.d.ts +8 -8
- package/dist/commonjs/react-query/organizationsExportCompanyTargetFacilities.d.ts.map +1 -1
- package/dist/commonjs/react-query/organizationsExportCompanyTargetFacilities.js.map +1 -1
- package/dist/commonjs/react-query/organizationsListCompanyTargetFacilities.core.d.ts +54 -0
- package/dist/commonjs/react-query/organizationsListCompanyTargetFacilities.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/organizationsListCompanyTargetFacilities.core.js +111 -0
- package/dist/commonjs/react-query/organizationsListCompanyTargetFacilities.core.js.map +1 -0
- package/dist/commonjs/react-query/organizationsListCompanyTargetFacilities.d.ts +154 -0
- package/dist/commonjs/react-query/organizationsListCompanyTargetFacilities.d.ts.map +1 -0
- package/dist/commonjs/react-query/organizationsListCompanyTargetFacilities.js +180 -0
- package/dist/commonjs/react-query/organizationsListCompanyTargetFacilities.js.map +1 -0
- package/dist/commonjs/react-query/organizationsListFacilityVendors.core.d.ts +2 -2
- package/dist/commonjs/react-query/organizationsListFacilityVendors.core.d.ts.map +1 -1
- package/dist/commonjs/react-query/organizationsListFacilityVendors.d.ts +2 -2
- package/dist/commonjs/react-query/organizationsListFacilityVendors.d.ts.map +1 -1
- package/dist/commonjs/sdk/organizations.d.ts +64 -0
- package/dist/commonjs/sdk/organizations.d.ts.map +1 -1
- package/dist/commonjs/sdk/organizations.js +71 -0
- package/dist/commonjs/sdk/organizations.js.map +1 -1
- package/dist/esm/__tests__/organizations.test.js +73 -7
- package/dist/esm/__tests__/organizations.test.js.map +1 -1
- package/dist/esm/__tests__/webhooks.test.js +1 -1
- package/dist/esm/__tests__/webhooks.test.js.map +1 -1
- package/dist/esm/__tests__/zones.test.js +34 -6
- package/dist/esm/__tests__/zones.test.js.map +1 -1
- package/dist/esm/funcs/organizationsCreateCompanyTargetFacility.d.ts +34 -0
- package/dist/esm/funcs/organizationsCreateCompanyTargetFacility.d.ts.map +1 -0
- package/dist/esm/funcs/organizationsCreateCompanyTargetFacility.js +109 -0
- package/dist/esm/funcs/organizationsCreateCompanyTargetFacility.js.map +1 -0
- package/dist/esm/funcs/organizationsDeleteCompanyTargetFacility.d.ts +28 -0
- package/dist/esm/funcs/organizationsDeleteCompanyTargetFacility.d.ts.map +1 -0
- package/dist/esm/funcs/organizationsDeleteCompanyTargetFacility.js +102 -0
- package/dist/esm/funcs/organizationsDeleteCompanyTargetFacility.js.map +1 -0
- package/dist/esm/funcs/organizationsListCompanyTargetFacilities.d.ts +42 -0
- package/dist/esm/funcs/organizationsListCompanyTargetFacilities.d.ts.map +1 -0
- package/dist/esm/funcs/organizationsListCompanyTargetFacilities.js +158 -0
- package/dist/esm/funcs/organizationsListCompanyTargetFacilities.js.map +1 -0
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/models/components/companytargetfacility.d.ts +54 -0
- package/dist/esm/models/components/companytargetfacility.d.ts.map +1 -0
- package/dist/esm/models/components/companytargetfacility.js +41 -0
- package/dist/esm/models/components/companytargetfacility.js.map +1 -0
- package/dist/esm/models/components/index.d.ts +1 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +1 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/operations/createcompanytargetfacility.d.ts +50 -0
- package/dist/esm/models/operations/createcompanytargetfacility.d.ts.map +1 -0
- package/dist/esm/models/operations/createcompanytargetfacility.js +45 -0
- package/dist/esm/models/operations/createcompanytargetfacility.js.map +1 -0
- package/dist/esm/models/operations/deletecompanytargetfacility.d.ts +20 -0
- package/dist/esm/models/operations/deletecompanytargetfacility.d.ts.map +1 -0
- package/dist/esm/models/operations/deletecompanytargetfacility.js +18 -0
- package/dist/esm/models/operations/deletecompanytargetfacility.js.map +1 -0
- package/dist/esm/models/operations/exportcompanytargetfacilities.d.ts +16 -16
- package/dist/esm/models/operations/exportcompanytargetfacilities.d.ts.map +1 -1
- package/dist/esm/models/operations/exportcompanytargetfacilities.js +13 -14
- package/dist/esm/models/operations/exportcompanytargetfacilities.js.map +1 -1
- package/dist/esm/models/operations/index.d.ts +3 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +3 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listcompanytargetfacilities.d.ts +173 -0
- package/dist/esm/models/operations/listcompanytargetfacilities.d.ts.map +1 -0
- package/dist/esm/models/operations/listcompanytargetfacilities.js +111 -0
- package/dist/esm/models/operations/listcompanytargetfacilities.js.map +1 -0
- package/dist/esm/models/operations/listfacilityvendors.d.ts +4 -4
- package/dist/esm/models/operations/listfacilityvendors.d.ts.map +1 -1
- package/dist/esm/models/operations/listfacilityvendors.js +3 -3
- package/dist/esm/models/operations/listfacilityvendors.js.map +1 -1
- package/dist/esm/react-query/index.d.ts +3 -0
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +3 -0
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/react-query/organizationsCreateCompanyTargetFacility.d.ts +43 -0
- package/dist/esm/react-query/organizationsCreateCompanyTargetFacility.d.ts.map +1 -0
- package/dist/esm/react-query/organizationsCreateCompanyTargetFacility.js +60 -0
- package/dist/esm/react-query/organizationsCreateCompanyTargetFacility.js.map +1 -0
- package/dist/esm/react-query/organizationsDeleteCompanyTargetFacility.d.ts +37 -0
- package/dist/esm/react-query/organizationsDeleteCompanyTargetFacility.d.ts.map +1 -0
- package/dist/esm/react-query/organizationsDeleteCompanyTargetFacility.js +54 -0
- package/dist/esm/react-query/organizationsDeleteCompanyTargetFacility.js.map +1 -0
- package/dist/esm/react-query/organizationsExportCompanyTargetFacilities.core.d.ts +4 -4
- package/dist/esm/react-query/organizationsExportCompanyTargetFacilities.core.d.ts.map +1 -1
- package/dist/esm/react-query/organizationsExportCompanyTargetFacilities.core.js.map +1 -1
- package/dist/esm/react-query/organizationsExportCompanyTargetFacilities.d.ts +8 -8
- package/dist/esm/react-query/organizationsExportCompanyTargetFacilities.d.ts.map +1 -1
- package/dist/esm/react-query/organizationsExportCompanyTargetFacilities.js.map +1 -1
- package/dist/esm/react-query/organizationsListCompanyTargetFacilities.core.d.ts +54 -0
- package/dist/esm/react-query/organizationsListCompanyTargetFacilities.core.d.ts.map +1 -0
- package/dist/esm/react-query/organizationsListCompanyTargetFacilities.core.js +103 -0
- package/dist/esm/react-query/organizationsListCompanyTargetFacilities.core.js.map +1 -0
- package/dist/esm/react-query/organizationsListCompanyTargetFacilities.d.ts +154 -0
- package/dist/esm/react-query/organizationsListCompanyTargetFacilities.d.ts.map +1 -0
- package/dist/esm/react-query/organizationsListCompanyTargetFacilities.js +165 -0
- package/dist/esm/react-query/organizationsListCompanyTargetFacilities.js.map +1 -0
- package/dist/esm/react-query/organizationsListFacilityVendors.core.d.ts +2 -2
- package/dist/esm/react-query/organizationsListFacilityVendors.core.d.ts.map +1 -1
- package/dist/esm/react-query/organizationsListFacilityVendors.d.ts +2 -2
- package/dist/esm/react-query/organizationsListFacilityVendors.d.ts.map +1 -1
- package/dist/esm/sdk/organizations.d.ts +64 -0
- package/dist/esm/sdk/organizations.d.ts.map +1 -1
- package/dist/esm/sdk/organizations.js +71 -0
- package/dist/esm/sdk/organizations.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/organizations.test.ts +79 -13
- package/src/__tests__/webhooks.test.ts +1 -1
- package/src/__tests__/zones.test.ts +34 -6
- package/src/funcs/organizationsCreateCompanyTargetFacility.ts +204 -0
- package/src/funcs/organizationsDeleteCompanyTargetFacility.ts +193 -0
- package/src/funcs/organizationsListCompanyTargetFacilities.ts +291 -0
- package/src/lib/config.ts +3 -3
- package/src/models/components/companytargetfacility.ts +124 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/operations/createcompanytargetfacility.ts +132 -0
- package/src/models/operations/deletecompanytargetfacility.ts +47 -0
- package/src/models/operations/exportcompanytargetfacilities.ts +34 -31
- package/src/models/operations/index.ts +3 -0
- package/src/models/operations/listcompanytargetfacilities.ts +293 -0
- package/src/models/operations/listfacilityvendors.ts +10 -7
- package/src/react-query/index.ts +3 -0
- package/src/react-query/organizationsCreateCompanyTargetFacility.ts +129 -0
- package/src/react-query/organizationsDeleteCompanyTargetFacility.ts +122 -0
- package/src/react-query/organizationsExportCompanyTargetFacilities.core.ts +4 -6
- package/src/react-query/organizationsExportCompanyTargetFacilities.ts +12 -10
- package/src/react-query/organizationsListCompanyTargetFacilities.core.ts +239 -0
- package/src/react-query/organizationsListCompanyTargetFacilities.ts +369 -0
- package/src/react-query/organizationsListFacilityVendors.core.ts +2 -2
- package/src/react-query/organizationsListFacilityVendors.ts +2 -2
- package/src/sdk/organizations.ts +102 -0
package/README.md
CHANGED
|
@@ -236,6 +236,9 @@ run();
|
|
|
236
236
|
* [listOrSearchFacilities](docs/sdks/organizations/README.md#listorsearchfacilities) - List or search facilities
|
|
237
237
|
* [getFacility](docs/sdks/organizations/README.md#getfacility) - Get facility
|
|
238
238
|
* [listOrSearchDepartments](docs/sdks/organizations/README.md#listorsearchdepartments) - List or search departments
|
|
239
|
+
* [listCompanyTargetFacilities](docs/sdks/organizations/README.md#listcompanytargetfacilities) - List company target facilities
|
|
240
|
+
* [createCompanyTargetFacility](docs/sdks/organizations/README.md#createcompanytargetfacility) - Add a company target facility
|
|
241
|
+
* [deleteCompanyTargetFacility](docs/sdks/organizations/README.md#deletecompanytargetfacility) - Remove a company target facility
|
|
239
242
|
* [exportCompanyTargetFacilities](docs/sdks/organizations/README.md#exportcompanytargetfacilities) - Export company target facilities to CSV (async)
|
|
240
243
|
* [getCompanyTargetFacilitiesExportStatus](docs/sdks/organizations/README.md#getcompanytargetfacilitiesexportstatus) - Get company target facilities export status
|
|
241
244
|
* [downloadCompanyTargetFacilitiesExport](docs/sdks/organizations/README.md#downloadcompanytargetfacilitiesexport) - Download company target facilities CSV
|
|
@@ -412,10 +415,13 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
|
|
|
412
415
|
- [`invoicesUpdateInvoice`](docs/sdks/invoices/README.md#updateinvoice) - Update invoice
|
|
413
416
|
- [`lookupsListLookupSystems`](docs/sdks/lookups/README.md#listlookupsystems) - List systems for dropdown/picker use
|
|
414
417
|
- [`mobileDevicesAddMobileDevice`](docs/sdks/mobiledevices/README.md#addmobiledevice) - Add mobile device
|
|
418
|
+
- [`organizationsCreateCompanyTargetFacility`](docs/sdks/organizations/README.md#createcompanytargetfacility) - Add a company target facility
|
|
419
|
+
- [`organizationsDeleteCompanyTargetFacility`](docs/sdks/organizations/README.md#deletecompanytargetfacility) - Remove a company target facility
|
|
415
420
|
- [`organizationsDownloadCompanyTargetFacilitiesExport`](docs/sdks/organizations/README.md#downloadcompanytargetfacilitiesexport) - Download company target facilities CSV
|
|
416
421
|
- [`organizationsExportCompanyTargetFacilities`](docs/sdks/organizations/README.md#exportcompanytargetfacilities) - Export company target facilities to CSV (async)
|
|
417
422
|
- [`organizationsGetCompanyTargetFacilitiesExportStatus`](docs/sdks/organizations/README.md#getcompanytargetfacilitiesexportstatus) - Get company target facilities export status
|
|
418
423
|
- [`organizationsGetFacility`](docs/sdks/organizations/README.md#getfacility) - Get facility
|
|
424
|
+
- [`organizationsListCompanyTargetFacilities`](docs/sdks/organizations/README.md#listcompanytargetfacilities) - List company target facilities
|
|
419
425
|
- [`organizationsListFacilityVendors`](docs/sdks/organizations/README.md#listfacilityvendors) - List vendors targeting a facility
|
|
420
426
|
- [`organizationsListOrSearchDepartmentContacts`](docs/sdks/organizations/README.md#listorsearchdepartmentcontacts) - List or search department contacts
|
|
421
427
|
- [`organizationsListOrSearchDepartments`](docs/sdks/organizations/README.md#listorsearchdepartments) - List or search departments
|
|
@@ -571,10 +577,13 @@ To learn about this feature and how to get started, check
|
|
|
571
577
|
- [`useInvoicesUpdateInvoiceMutation`](docs/sdks/invoices/README.md#updateinvoice) - Update invoice
|
|
572
578
|
- [`useLookupsListLookupSystems`](docs/sdks/lookups/README.md#listlookupsystems) - List systems for dropdown/picker use
|
|
573
579
|
- [`useMobileDevicesAddMobileDeviceMutation`](docs/sdks/mobiledevices/README.md#addmobiledevice) - Add mobile device
|
|
580
|
+
- [`useOrganizationsCreateCompanyTargetFacilityMutation`](docs/sdks/organizations/README.md#createcompanytargetfacility) - Add a company target facility
|
|
581
|
+
- [`useOrganizationsDeleteCompanyTargetFacilityMutation`](docs/sdks/organizations/README.md#deletecompanytargetfacility) - Remove a company target facility
|
|
574
582
|
- [`useOrganizationsDownloadCompanyTargetFacilitiesExport`](docs/sdks/organizations/README.md#downloadcompanytargetfacilitiesexport) - Download company target facilities CSV
|
|
575
583
|
- [`useOrganizationsExportCompanyTargetFacilities`](docs/sdks/organizations/README.md#exportcompanytargetfacilities) - Export company target facilities to CSV (async)
|
|
576
584
|
- [`useOrganizationsGetCompanyTargetFacilitiesExportStatus`](docs/sdks/organizations/README.md#getcompanytargetfacilitiesexportstatus) - Get company target facilities export status
|
|
577
585
|
- [`useOrganizationsGetFacility`](docs/sdks/organizations/README.md#getfacility) - Get facility
|
|
586
|
+
- [`useOrganizationsListCompanyTargetFacilities`](docs/sdks/organizations/README.md#listcompanytargetfacilities) - List company target facilities
|
|
578
587
|
- [`useOrganizationsListFacilityVendors`](docs/sdks/organizations/README.md#listfacilityvendors) - List vendors targeting a facility
|
|
579
588
|
- [`useOrganizationsListOrSearchDepartmentContacts`](docs/sdks/organizations/README.md#listorsearchdepartmentcontacts) - List or search department contacts
|
|
580
589
|
- [`useOrganizationsListOrSearchDepartments`](docs/sdks/organizations/README.md#listorsearchdepartments) - List or search departments
|
|
@@ -78,14 +78,80 @@ const testclient_js_1 = require("./testclient.js");
|
|
|
78
78
|
],
|
|
79
79
|
});
|
|
80
80
|
});
|
|
81
|
-
vitest_1.
|
|
82
|
-
|
|
81
|
+
(0, vitest_1.test)("Organizations List Company Target Facilities", async () => {
|
|
82
|
+
const testHttpClient = (0, testclient_js_1.createTestHTTPClient)("listCompanyTargetFacilities");
|
|
83
|
+
const greenSecurity = new index_js_1.GreenSecurity({
|
|
84
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "https://localhost:3000/api",
|
|
85
|
+
httpClient: testHttpClient,
|
|
86
|
+
security: {
|
|
87
|
+
token: process.env["GREEN_SECURITY_TOKEN"] ?? "value",
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
const result = await greenSecurity.organizations.listCompanyTargetFacilities({
|
|
91
|
+
companyId: 864839,
|
|
92
|
+
expand: [
|
|
93
|
+
"facility.system",
|
|
94
|
+
],
|
|
95
|
+
desc: true,
|
|
96
|
+
itemsPerPage: 25,
|
|
97
|
+
});
|
|
98
|
+
(0, vitest_1.expect)(result).toBeDefined();
|
|
99
|
+
(0, vitest_1.expect)(result.result).toBeDefined();
|
|
100
|
+
(0, vitest_1.expect)(result.result).toEqual({
|
|
101
|
+
pager: {
|
|
102
|
+
baseUrl: "api/vendors/job_titles",
|
|
103
|
+
sort: "job,title",
|
|
104
|
+
desc: 0,
|
|
105
|
+
itemCount: 228,
|
|
106
|
+
itemsPerPage: 112555,
|
|
107
|
+
page: 1,
|
|
108
|
+
useUrlParams: true,
|
|
109
|
+
},
|
|
110
|
+
items: [],
|
|
111
|
+
});
|
|
83
112
|
});
|
|
84
|
-
vitest_1.
|
|
85
|
-
|
|
113
|
+
(0, vitest_1.test)("Organizations Create Company Target Facility", async () => {
|
|
114
|
+
const testHttpClient = (0, testclient_js_1.createTestHTTPClient)("createCompanyTargetFacility");
|
|
115
|
+
const greenSecurity = new index_js_1.GreenSecurity({
|
|
116
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "https://localhost:3000/api",
|
|
117
|
+
httpClient: testHttpClient,
|
|
118
|
+
security: {
|
|
119
|
+
token: process.env["GREEN_SECURITY_TOKEN"] ?? "value",
|
|
120
|
+
},
|
|
121
|
+
});
|
|
122
|
+
const result = await greenSecurity.organizations.createCompanyTargetFacility({
|
|
123
|
+
companyId: 846108,
|
|
124
|
+
expand: [
|
|
125
|
+
"facility.system",
|
|
126
|
+
],
|
|
127
|
+
requestBody: {
|
|
128
|
+
facilityId: 253646,
|
|
129
|
+
},
|
|
130
|
+
});
|
|
131
|
+
(0, vitest_1.expect)(result).toBeDefined();
|
|
132
|
+
(0, vitest_1.expect)(result).toEqual({
|
|
133
|
+
companyTargetFacility: {
|
|
134
|
+
id: 335466,
|
|
135
|
+
facility: 582706,
|
|
136
|
+
status: "<value>",
|
|
137
|
+
},
|
|
138
|
+
});
|
|
86
139
|
});
|
|
87
|
-
vitest_1.
|
|
88
|
-
|
|
140
|
+
(0, vitest_1.test)("Organizations Delete Company Target Facility", async () => {
|
|
141
|
+
const testHttpClient = (0, testclient_js_1.createTestHTTPClient)("deleteCompanyTargetFacility");
|
|
142
|
+
const greenSecurity = new index_js_1.GreenSecurity({
|
|
143
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "https://localhost:3000/api",
|
|
144
|
+
httpClient: testHttpClient,
|
|
145
|
+
security: {
|
|
146
|
+
token: process.env["GREEN_SECURITY_TOKEN"] ?? "value",
|
|
147
|
+
},
|
|
148
|
+
});
|
|
149
|
+
const result = await greenSecurity.organizations.deleteCompanyTargetFacility({
|
|
150
|
+
companyId: 56711,
|
|
151
|
+
id: 304723,
|
|
152
|
+
});
|
|
153
|
+
(0, vitest_1.expect)(result).toBeDefined();
|
|
154
|
+
(0, vitest_1.expect)(result).toEqual(true);
|
|
89
155
|
});
|
|
90
156
|
(0, vitest_1.test)("Organizations Export Company Target Facilities", async () => {
|
|
91
157
|
const testHttpClient = (0, testclient_js_1.createTestHTTPClient)("exportCompanyTargetFacilities");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizations.test.js","sourceRoot":"","sources":["../../../src/__tests__/organizations.test.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAEH,
|
|
1
|
+
{"version":3,"file":"organizations.test.js","sourceRoot":"","sources":["../../../src/__tests__/organizations.test.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAEH,mCAAsC;AACtC,0CAA4C;AAC5C,mDAAuD;AAEvD,IAAA,aAAI,EAAC,0CAA0C,EAAE,KAAK,IAAI,EAAE;IAC1D,MAAM,cAAc,GAAG,IAAA,oCAAoB,EAAC,yBAAyB,CAAC,CAAC;IAEvE,MAAM,aAAa,GAAG,IAAI,wBAAa,CAAC;QACtC,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,4BAA4B;QACzE,UAAU,EAAE,cAAc;QAC1B,QAAQ,EAAE;YACR,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,IAAI,OAAO;SACtD;KACF,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,aAAa,CAAC,uBAAuB,CAAC;QACvE,EAAE,EAAE,MAAM;QACV,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,IAAI;QACV,YAAY,EAAE,EAAE;KACjB,CAAC,CAAC;IACH,IAAA,eAAM,EAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;IA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,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;AACrC,CAAC,CAAC,CAAC;AAEH,IAAA,aAAI,EAAC,qCAAqC,EAAE,KAAK,IAAI,EAAE;IACrD,MAAM,cAAc,GAAG,IAAA,oCAAoB,EAAC,qBAAqB,CAAC,CAAC;IAEnE,MAAM,aAAa,GAAG,IAAI,wBAAa,CAAC;QACtC,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,4BAA4B;QACzE,UAAU,EAAE,cAAc;QAC1B,QAAQ,EAAE;YACR,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,IAAI,OAAO;SACtD;KACF,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,aAAa,CAAC,mBAAmB,CAAC;QACnE,EAAE,EAAE,MAAM;QACV,YAAY,EAAE,EAAE;QAChB,IAAI,EAAE,IAAI;KACX,CAAC,CAAC;IACH,IAAA,eAAM,EAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;IAC7B,IAAA,eAAM,EAAC,MAAO,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;IACrC,IAAA,eAAM,EAAC,MAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC;QAC7B,KAAK,EAAE;YACL,OAAO,EAAE,wBAAwB;YACjC,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,CAAC;YACP,SAAS,EAAE,GAAG;YACd,YAAY,EAAE,GAAG;YACjB,IAAI,EAAE,CAAC;YACP,YAAY,EAAE,IAAI;SACnB;QACD,KAAK,EAAE,EAAE;KACV,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -18,7 +18,7 @@ const testclient_js_1 = require("./testclient.js");
|
|
|
18
18
|
const testWebhookListForVendorUserResult = await greenSecurity.webhooks
|
|
19
19
|
.listAllWebhookEndpoints({
|
|
20
20
|
itemsPerPage: 25,
|
|
21
|
-
desc:
|
|
21
|
+
desc: true,
|
|
22
22
|
sort: "",
|
|
23
23
|
});
|
|
24
24
|
(0, vitest_1.expect)(testWebhookListForVendorUserResult).toBeDefined();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.test.js","sourceRoot":"","sources":["../../../src/__tests__/webhooks.test.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAEH,mCAAsC;AACtC,0CAA4C;AAC5C,mDAAuD;AAEvD,IAAA,aAAI,EAAC,qCAAqC,EAAE,KAAK,IAAI,EAAE;IACrD,MAAM,cAAc,GAAG,IAAA,oCAAoB,EAAC,yBAAyB,CAAC,CAAC;IAEvE,MAAM,aAAa,GAAG,IAAI,wBAAa,CAAC;QACtC,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,4BAA4B;QACzE,QAAQ,EAAE;YACR,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,IAAI,SAAS;SACtD;QACD,UAAU,EAAE,cAAc;KAC3B,CAAC,CAAC;IAEH,MAAM,kCAAkC,GAAG,MAAM,aAAa,CAAC,QAAQ;SACpE,uBAAuB,CAAC;QACvB,YAAY,EAAE,EAAE;QAChB,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"webhooks.test.js","sourceRoot":"","sources":["../../../src/__tests__/webhooks.test.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAEH,mCAAsC;AACtC,0CAA4C;AAC5C,mDAAuD;AAEvD,IAAA,aAAI,EAAC,qCAAqC,EAAE,KAAK,IAAI,EAAE;IACrD,MAAM,cAAc,GAAG,IAAA,oCAAoB,EAAC,yBAAyB,CAAC,CAAC;IAEvE,MAAM,aAAa,GAAG,IAAI,wBAAa,CAAC;QACtC,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,4BAA4B;QACzE,QAAQ,EAAE;YACR,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,IAAI,SAAS;SACtD;QACD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H,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,QAAQ;SACxC,uCAAuC,CAAC;QACvC,EAAE,EAAE,MAAM;QACV,eAAe,EAAE;YACf,EAAE,EAAE,CAAC;YACL,UAAU,EAAE,sCAAsC;YAClD,aAAa,EAAE;gBACb,WAAW;gBACX,WAAW;aACZ;YACD,SAAS,EAAE;gBACT,QAAQ,EAAE,CAAC;gBACX,UAAU,EAAE,CAAC;gBACb,SAAS,EAAE,CAAC;gBACZ,MAAM,EAAE,CAAC;aACV;SACF;KACF,CAAC,CAAC;IACL,IAAA,eAAM,EAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;IAC7B,IAAA,eAAM,EAAC,MAAM,CAAC,CAAC,OAAO,CAAC;QACrB,EAAE,EAAE,CAAC;QACL,UAAU,EAAE,sCAAsC;QAClD,aAAa,EAAE,iBAAiB;QAChC,aAAa,EAAE;YACb,WAAW;YACX,WAAW;SACZ;QACD,SAAS,EAAE;YACT,QAAQ,EAAE,CAAC;YACX,UAAU,EAAE,CAAC;YACb,SAAS,EAAE,CAAC;YACZ,MAAM,EAAE,CAAC;SACV;KACF,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -38,7 +38,7 @@ const testclient_js_1 = require("./testclient.js");
|
|
|
38
38
|
contacts: {
|
|
39
39
|
contact: {
|
|
40
40
|
status: "Active",
|
|
41
|
-
department:
|
|
41
|
+
department: 123,
|
|
42
42
|
},
|
|
43
43
|
adminContact: {
|
|
44
44
|
status: "Deleted",
|
|
@@ -49,7 +49,7 @@ const testclient_js_1 = require("./testclient.js");
|
|
|
49
49
|
department: 123,
|
|
50
50
|
},
|
|
51
51
|
greenSecurityCsm: {
|
|
52
|
-
status: "
|
|
52
|
+
status: "Deleted",
|
|
53
53
|
department: 123,
|
|
54
54
|
},
|
|
55
55
|
accountManager: {
|
|
@@ -58,14 +58,42 @@ const testclient_js_1 = require("./testclient.js");
|
|
|
58
58
|
},
|
|
59
59
|
},
|
|
60
60
|
vendorGuestPolicy: {
|
|
61
|
-
enabled:
|
|
61
|
+
enabled: true,
|
|
62
62
|
vendorGuestLimitAndOr: "and",
|
|
63
|
-
vendorGuestRequireEmail:
|
|
63
|
+
vendorGuestRequireEmail: true,
|
|
64
64
|
},
|
|
65
65
|
},
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
|
-
facility: {
|
|
68
|
+
facility: {
|
|
69
|
+
contacts: {
|
|
70
|
+
contact: {
|
|
71
|
+
status: "Active",
|
|
72
|
+
department: 123,
|
|
73
|
+
},
|
|
74
|
+
adminContact: {
|
|
75
|
+
status: "Deleted",
|
|
76
|
+
department: null,
|
|
77
|
+
},
|
|
78
|
+
techContact: {
|
|
79
|
+
status: "Inactive",
|
|
80
|
+
department: 123,
|
|
81
|
+
},
|
|
82
|
+
greenSecurityCsm: {
|
|
83
|
+
status: "Deleted",
|
|
84
|
+
department: 123,
|
|
85
|
+
},
|
|
86
|
+
accountManager: {
|
|
87
|
+
status: "Active",
|
|
88
|
+
department: 123,
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
vendorGuestPolicy: {
|
|
92
|
+
enabled: true,
|
|
93
|
+
vendorGuestLimitAndOr: "and",
|
|
94
|
+
vendorGuestRequireEmail: true,
|
|
95
|
+
},
|
|
96
|
+
},
|
|
69
97
|
},
|
|
70
98
|
],
|
|
71
99
|
});
|
|
@@ -81,7 +109,7 @@ const testclient_js_1 = require("./testclient.js");
|
|
|
81
109
|
});
|
|
82
110
|
const result = await greenSecurity.zones.securityZoneCheckin({
|
|
83
111
|
qrCode: "<value>",
|
|
84
|
-
zoneId:
|
|
112
|
+
zoneId: 290531,
|
|
85
113
|
});
|
|
86
114
|
(0, vitest_1.expect)(result).toBeDefined();
|
|
87
115
|
(0, vitest_1.expect)(result).toEqual({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zones.test.js","sourceRoot":"","sources":["../../../src/__tests__/zones.test.ts"],"names":[],"mappings":";AAAA;;GAEG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M,MAAM,GAAG,MAAM,aAAa,CAAC,KAAK,CAAC,mBAAmB,CAAC;QAC3D,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,MAAM;KACf,CAAC,CAAC;IACH,IAAA,eAAM,EAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;IAC7B,IAAA,eAAM,EAAC,MAAM,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;AAC7B,CAAC,CAAC,CAAC;AAEH,IAAA,aAAI,EAAC,yBAAyB,EAAE,KAAK,IAAI,EAAE;IACzC,MAAM,cAAc,GAAG,IAAA,oCAAoB,EAAC,iBAAiB,CAAC,CAAC;IAE/D,MAAM,aAAa,GAAG,IAAI,wBAAa,CAAC;QACtC,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,4BAA4B;QACzE,UAAU,EAAE,cAAc;QAC1B,QAAQ,EAAE;YACR,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,IAAI,OAAO;SACtD;KACF,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,KAAK,CAAC,eAAe,CAAC;QACvD,EAAE,EAAE,KAAK;KACV,CAAC,CAAC;IACH,IAAA,eAAM,EAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;IAC7B,IAAA,eAAM,EAAC,MAAM,CAAC,CAAC,OAAO,CAAC;QACrB,QAAQ,EAAE,EAAE;KACb,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { GreenSecurityCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { GreenSecurityError } from "../models/errors/greensecurityerror.js";
|
|
4
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
5
|
+
import * as errors from "../models/errors/index.js";
|
|
6
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
7
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
8
|
+
import * as operations from "../models/operations/index.js";
|
|
9
|
+
import { APIPromise } from "../types/async.js";
|
|
10
|
+
import { Result } from "../types/fp.js";
|
|
11
|
+
/**
|
|
12
|
+
* Add a company target facility
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* Links the URL's company to an existing facility. The link is created with
|
|
16
|
+
* status `Pending`. Only the link row is created — the Facility entity
|
|
17
|
+
* itself is never created or modified by this endpoint.
|
|
18
|
+
*
|
|
19
|
+
* Access control: the URL's `company_id` must be in the caller's update
|
|
20
|
+
* scope for Company, AND the `facility_id` must be in the caller's create
|
|
21
|
+
* scope for Facility (a facility on the company's site, or a facility
|
|
22
|
+
* reachable via the API user's site/system/facility-scoped activation).
|
|
23
|
+
* Either being out of scope returns `404 Company not found` /
|
|
24
|
+
* `404 Facility not found` respectively. Deleted facilities also return
|
|
25
|
+
* `404 Facility not found`.
|
|
26
|
+
*
|
|
27
|
+
* Available `expand` scopes are:
|
|
28
|
+
*
|
|
29
|
+
* - company_target_facility.facility
|
|
30
|
+
*
|
|
31
|
+
* If set, this operation will use {@link Security.bearerJwt} from the global security.
|
|
32
|
+
*/
|
|
33
|
+
export declare function organizationsCreateCompanyTargetFacility(client: GreenSecurityCore, request: operations.CreateCompanyTargetFacilityRequest, options?: RequestOptions): APIPromise<Result<operations.CreateCompanyTargetFacilityCreateCompanyTargetFacilityOk, errors.ApiErrorResponse | GreenSecurityError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
34
|
+
//# sourceMappingURL=organizationsCreateCompanyTargetFacility.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organizationsCreateCompanyTargetFacility.d.ts","sourceRoot":"","sources":["../../../src/funcs/organizationsCreateCompanyTargetFacility.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAM/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,wCAAwC,CACtD,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,UAAU,CAAC,kCAAkC,EACtD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,wDAAwD,EACjE,MAAM,CAAC,gBAAgB,GACvB,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.organizationsCreateCompanyTargetFacility = organizationsCreateCompanyTargetFacility;
|
|
40
|
+
const encodings_js_1 = require("../lib/encodings.js");
|
|
41
|
+
const http_js_1 = require("../lib/http.js");
|
|
42
|
+
const M = __importStar(require("../lib/matchers.js"));
|
|
43
|
+
const primitives_js_1 = require("../lib/primitives.js");
|
|
44
|
+
const schemas_js_1 = require("../lib/schemas.js");
|
|
45
|
+
const security_js_1 = require("../lib/security.js");
|
|
46
|
+
const url_js_1 = require("../lib/url.js");
|
|
47
|
+
const errors = __importStar(require("../models/errors/index.js"));
|
|
48
|
+
const operations = __importStar(require("../models/operations/index.js"));
|
|
49
|
+
const async_js_1 = require("../types/async.js");
|
|
50
|
+
/**
|
|
51
|
+
* Add a company target facility
|
|
52
|
+
*
|
|
53
|
+
* @remarks
|
|
54
|
+
* Links the URL's company to an existing facility. The link is created with
|
|
55
|
+
* status `Pending`. Only the link row is created — the Facility entity
|
|
56
|
+
* itself is never created or modified by this endpoint.
|
|
57
|
+
*
|
|
58
|
+
* Access control: the URL's `company_id` must be in the caller's update
|
|
59
|
+
* scope for Company, AND the `facility_id` must be in the caller's create
|
|
60
|
+
* scope for Facility (a facility on the company's site, or a facility
|
|
61
|
+
* reachable via the API user's site/system/facility-scoped activation).
|
|
62
|
+
* Either being out of scope returns `404 Company not found` /
|
|
63
|
+
* `404 Facility not found` respectively. Deleted facilities also return
|
|
64
|
+
* `404 Facility not found`.
|
|
65
|
+
*
|
|
66
|
+
* Available `expand` scopes are:
|
|
67
|
+
*
|
|
68
|
+
* - company_target_facility.facility
|
|
69
|
+
*
|
|
70
|
+
* If set, this operation will use {@link Security.bearerJwt} from the global security.
|
|
71
|
+
*/
|
|
72
|
+
function organizationsCreateCompanyTargetFacility(client, request, options) {
|
|
73
|
+
return new async_js_1.APIPromise($do(client, request, options));
|
|
74
|
+
}
|
|
75
|
+
async function $do(client, request, options) {
|
|
76
|
+
const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.CreateCompanyTargetFacilityRequest$outboundSchema.parse(value), "Input validation failed");
|
|
77
|
+
if (!parsed.ok) {
|
|
78
|
+
return [parsed, { status: "invalid" }];
|
|
79
|
+
}
|
|
80
|
+
const payload = parsed.value;
|
|
81
|
+
const body = (0, encodings_js_1.encodeJSON)("body", payload.RequestBody, { explode: true });
|
|
82
|
+
const pathParams = {
|
|
83
|
+
company_id: (0, encodings_js_1.encodeSimple)("company_id", payload.company_id, {
|
|
84
|
+
explode: false,
|
|
85
|
+
charEncoding: "percent",
|
|
86
|
+
}),
|
|
87
|
+
};
|
|
88
|
+
const path = (0, url_js_1.pathToFunc)("/companies/{company_id}/target-facilities")(pathParams);
|
|
89
|
+
const query = (0, encodings_js_1.encodeFormQuery)({
|
|
90
|
+
"expand": payload.expand,
|
|
91
|
+
}, { explode: false });
|
|
92
|
+
const headers = new Headers((0, primitives_js_1.compactMap)({
|
|
93
|
+
"Content-Type": "application/json",
|
|
94
|
+
Accept: "application/json",
|
|
95
|
+
}));
|
|
96
|
+
const securityInput = await (0, security_js_1.extractSecurity)(client._options.security);
|
|
97
|
+
const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput, [1]);
|
|
98
|
+
const context = {
|
|
99
|
+
options: client._options,
|
|
100
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
101
|
+
operationID: "createCompanyTargetFacility",
|
|
102
|
+
oAuth2Scopes: null,
|
|
103
|
+
resolvedSecurity: requestSecurity,
|
|
104
|
+
securitySource: client._options.security,
|
|
105
|
+
retryConfig: options?.retries
|
|
106
|
+
|| client._options.retryConfig
|
|
107
|
+
|| { strategy: "none" },
|
|
108
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
109
|
+
};
|
|
110
|
+
const requestRes = client._createRequest(context, {
|
|
111
|
+
security: requestSecurity,
|
|
112
|
+
method: "POST",
|
|
113
|
+
baseURL: options?.serverURL,
|
|
114
|
+
path: path,
|
|
115
|
+
headers: headers,
|
|
116
|
+
query: query,
|
|
117
|
+
body: body,
|
|
118
|
+
userAgent: client._options.userAgent,
|
|
119
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
120
|
+
}, options);
|
|
121
|
+
if (!requestRes.ok) {
|
|
122
|
+
return [requestRes, { status: "invalid" }];
|
|
123
|
+
}
|
|
124
|
+
const req = requestRes.value;
|
|
125
|
+
const doResult = await client._do(req, {
|
|
126
|
+
context,
|
|
127
|
+
isErrorStatusCode: (statusCode) => (0, http_js_1.matchStatusCode)({ status: statusCode }, ["4XX", "5XX"]),
|
|
128
|
+
retryConfig: context.retryConfig,
|
|
129
|
+
retryCodes: context.retryCodes,
|
|
130
|
+
});
|
|
131
|
+
if (!doResult.ok) {
|
|
132
|
+
return [doResult, { status: "request-error", request: req }];
|
|
133
|
+
}
|
|
134
|
+
const response = doResult.value;
|
|
135
|
+
const responseFields = {
|
|
136
|
+
HttpMeta: { Response: response, Request: req },
|
|
137
|
+
};
|
|
138
|
+
const [result] = await M.match(M.json(201, operations
|
|
139
|
+
.CreateCompanyTargetFacilityCreateCompanyTargetFacilityOk$inboundSchema), M.jsonErr([400, 401, 403, 404, 422], errors.ApiErrorResponse$inboundSchema), M.fail("4XX"), M.fail([500, "5XX"]))(response, req, { extraFields: responseFields });
|
|
140
|
+
if (!result.ok) {
|
|
141
|
+
return [result, { status: "complete", request: req, response }];
|
|
142
|
+
}
|
|
143
|
+
return [result, { status: "complete", request: req, response }];
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=organizationsCreateCompanyTargetFacility.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organizationsCreateCompanyTargetFacility.js","sourceRoot":"","sources":["../../../src/funcs/organizationsCreateCompanyTargetFacility.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDH,4FAuBC;AApED,sDAAgF;AAChF,4CAAiD;AACjD,sDAAwC;AACxC,wDAAkD;AAClD,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAS3C,kEAAoD;AAGpD,0EAA4D;AAC5D,gDAAwD;AAGxD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,SAAgB,wCAAwC,CACtD,MAAyB,EACzB,OAAsD,EACtD,OAAwB;IAexB,OAAO,IAAI,qBAAU,CAAC,GAAG,CACvB,MAAM,EACN,OAAO,EACP,OAAO,CACR,CAAC,CAAC;AACL,CAAC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@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { GreenSecurityCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { GreenSecurityError } from "../models/errors/greensecurityerror.js";
|
|
4
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
5
|
+
import * as errors from "../models/errors/index.js";
|
|
6
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
7
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
8
|
+
import * as operations from "../models/operations/index.js";
|
|
9
|
+
import { APIPromise } from "../types/async.js";
|
|
10
|
+
import { Result } from "../types/fp.js";
|
|
11
|
+
/**
|
|
12
|
+
* Remove a company target facility
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* Removes a CompanyTargetFacility link. Blocked when any of the company's
|
|
16
|
+
* individuals still target the same facility (to avoid orphaning their
|
|
17
|
+
* vendor-scoped target rows). Only the link row is removed — the Facility
|
|
18
|
+
* entity itself is never touched.
|
|
19
|
+
*
|
|
20
|
+
* Access control: the URL's `company_id` must be in the caller's update
|
|
21
|
+
* scope for Company (a company manager's or vendor's own company, or a
|
|
22
|
+
* company whose app is activated for the API user). Callers outside that
|
|
23
|
+
* scope receive `404 Company not found`.
|
|
24
|
+
*
|
|
25
|
+
* If set, this operation will use {@link Security.bearerJwt} from the global security.
|
|
26
|
+
*/
|
|
27
|
+
export declare function organizationsDeleteCompanyTargetFacility(client: GreenSecurityCore, request: operations.DeleteCompanyTargetFacilityRequest, options?: RequestOptions): APIPromise<Result<boolean, errors.ApiErrorResponse | GreenSecurityError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
28
|
+
//# sourceMappingURL=organizationsDeleteCompanyTargetFacility.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organizationsDeleteCompanyTargetFacility.d.ts","sourceRoot":"","sources":["../../../src/funcs/organizationsDeleteCompanyTargetFacility.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAM/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAGxC;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,wCAAwC,CACtD,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,UAAU,CAAC,kCAAkC,EACtD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,OAAO,EACL,MAAM,CAAC,gBAAgB,GACvB,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.organizationsDeleteCompanyTargetFacility = organizationsDeleteCompanyTargetFacility;
|
|
40
|
+
const encodings_js_1 = require("../lib/encodings.js");
|
|
41
|
+
const http_js_1 = require("../lib/http.js");
|
|
42
|
+
const M = __importStar(require("../lib/matchers.js"));
|
|
43
|
+
const primitives_js_1 = require("../lib/primitives.js");
|
|
44
|
+
const schemas_js_1 = require("../lib/schemas.js");
|
|
45
|
+
const security_js_1 = require("../lib/security.js");
|
|
46
|
+
const url_js_1 = require("../lib/url.js");
|
|
47
|
+
const errors = __importStar(require("../models/errors/index.js"));
|
|
48
|
+
const operations = __importStar(require("../models/operations/index.js"));
|
|
49
|
+
const async_js_1 = require("../types/async.js");
|
|
50
|
+
const types$ = __importStar(require("../types/primitives.js"));
|
|
51
|
+
/**
|
|
52
|
+
* Remove a company target facility
|
|
53
|
+
*
|
|
54
|
+
* @remarks
|
|
55
|
+
* Removes a CompanyTargetFacility link. Blocked when any of the company's
|
|
56
|
+
* individuals still target the same facility (to avoid orphaning their
|
|
57
|
+
* vendor-scoped target rows). Only the link row is removed — the Facility
|
|
58
|
+
* entity itself is never touched.
|
|
59
|
+
*
|
|
60
|
+
* Access control: the URL's `company_id` must be in the caller's update
|
|
61
|
+
* scope for Company (a company manager's or vendor's own company, or a
|
|
62
|
+
* company whose app is activated for the API user). Callers outside that
|
|
63
|
+
* scope receive `404 Company not found`.
|
|
64
|
+
*
|
|
65
|
+
* If set, this operation will use {@link Security.bearerJwt} from the global security.
|
|
66
|
+
*/
|
|
67
|
+
function organizationsDeleteCompanyTargetFacility(client, request, options) {
|
|
68
|
+
return new async_js_1.APIPromise($do(client, request, options));
|
|
69
|
+
}
|
|
70
|
+
async function $do(client, request, options) {
|
|
71
|
+
const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.DeleteCompanyTargetFacilityRequest$outboundSchema.parse(value), "Input validation failed");
|
|
72
|
+
if (!parsed.ok) {
|
|
73
|
+
return [parsed, { status: "invalid" }];
|
|
74
|
+
}
|
|
75
|
+
const payload = parsed.value;
|
|
76
|
+
const body = null;
|
|
77
|
+
const pathParams = {
|
|
78
|
+
company_id: (0, encodings_js_1.encodeSimple)("company_id", payload.company_id, {
|
|
79
|
+
explode: false,
|
|
80
|
+
charEncoding: "percent",
|
|
81
|
+
}),
|
|
82
|
+
id: (0, encodings_js_1.encodeSimple)("id", payload.id, {
|
|
83
|
+
explode: false,
|
|
84
|
+
charEncoding: "percent",
|
|
85
|
+
}),
|
|
86
|
+
};
|
|
87
|
+
const path = (0, url_js_1.pathToFunc)("/companies/{company_id}/target-facilities/{id}")(pathParams);
|
|
88
|
+
const headers = new Headers((0, primitives_js_1.compactMap)({
|
|
89
|
+
Accept: "application/json",
|
|
90
|
+
}));
|
|
91
|
+
const securityInput = await (0, security_js_1.extractSecurity)(client._options.security);
|
|
92
|
+
const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput, [1]);
|
|
93
|
+
const context = {
|
|
94
|
+
options: client._options,
|
|
95
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
96
|
+
operationID: "deleteCompanyTargetFacility",
|
|
97
|
+
oAuth2Scopes: null,
|
|
98
|
+
resolvedSecurity: requestSecurity,
|
|
99
|
+
securitySource: client._options.security,
|
|
100
|
+
retryConfig: options?.retries
|
|
101
|
+
|| client._options.retryConfig
|
|
102
|
+
|| { strategy: "none" },
|
|
103
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
104
|
+
};
|
|
105
|
+
const requestRes = client._createRequest(context, {
|
|
106
|
+
security: requestSecurity,
|
|
107
|
+
method: "DELETE",
|
|
108
|
+
baseURL: options?.serverURL,
|
|
109
|
+
path: path,
|
|
110
|
+
headers: headers,
|
|
111
|
+
body: body,
|
|
112
|
+
userAgent: client._options.userAgent,
|
|
113
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
114
|
+
}, options);
|
|
115
|
+
if (!requestRes.ok) {
|
|
116
|
+
return [requestRes, { status: "invalid" }];
|
|
117
|
+
}
|
|
118
|
+
const req = requestRes.value;
|
|
119
|
+
const doResult = await client._do(req, {
|
|
120
|
+
context,
|
|
121
|
+
isErrorStatusCode: (statusCode) => (0, http_js_1.matchStatusCode)({ status: statusCode }, ["4XX", "5XX"]),
|
|
122
|
+
retryConfig: context.retryConfig,
|
|
123
|
+
retryCodes: context.retryCodes,
|
|
124
|
+
});
|
|
125
|
+
if (!doResult.ok) {
|
|
126
|
+
return [doResult, { status: "request-error", request: req }];
|
|
127
|
+
}
|
|
128
|
+
const response = doResult.value;
|
|
129
|
+
const responseFields = {
|
|
130
|
+
HttpMeta: { Response: response, Request: req },
|
|
131
|
+
};
|
|
132
|
+
const [result] = await M.match(M.json(200, types$.boolean()), M.jsonErr([400, 401, 403, 404, 422], errors.ApiErrorResponse$inboundSchema), M.fail("4XX"), M.fail([500, "5XX"]))(response, req, { extraFields: responseFields });
|
|
133
|
+
if (!result.ok) {
|
|
134
|
+
return [result, { status: "complete", request: req, response }];
|
|
135
|
+
}
|
|
136
|
+
return [result, { status: "complete", request: req, response }];
|
|
137
|
+
}
|
|
138
|
+
//# sourceMappingURL=organizationsDeleteCompanyTargetFacility.js.map
|