@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
|
@@ -118,7 +118,7 @@ export declare function setOrganizationsListFacilityVendorsData(client: QueryCli
|
|
|
118
118
|
id: number,
|
|
119
119
|
parameters: {
|
|
120
120
|
companyId?: number | undefined;
|
|
121
|
-
status?: operations.
|
|
121
|
+
status?: operations.ListFacilityVendorsQueryParamStatus | undefined;
|
|
122
122
|
search?: string | undefined;
|
|
123
123
|
page?: number | undefined;
|
|
124
124
|
itemsPerPage?: number | undefined;
|
|
@@ -130,7 +130,7 @@ export declare function invalidateOrganizationsListFacilityVendors(client: Query
|
|
|
130
130
|
id: number,
|
|
131
131
|
parameters: {
|
|
132
132
|
companyId?: number | undefined;
|
|
133
|
-
status?: operations.
|
|
133
|
+
status?: operations.ListFacilityVendorsQueryParamStatus | undefined;
|
|
134
134
|
search?: string | undefined;
|
|
135
135
|
page?: number | undefined;
|
|
136
136
|
itemsPerPage?: number | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizationsListFacilityVendors.d.ts","sourceRoot":"","sources":["../../../src/react-query/organizationsListFacilityVendors.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,YAAY,EACZ,sBAAsB,EACtB,WAAW,EAGX,sBAAsB,EAEtB,cAAc,EAEd,8BAA8B,EAE9B,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,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;AAE5D,OAAO,EACL,wBAAwB,EACxB,gBAAgB,EAChB,gCAAgC,EAChC,wBAAwB,EACxB,eAAe,EAChB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,kDAAkD,EAClD,0CAA0C,EAC1C,iDAAiD,EACjD,0CAA0C,EAC1C,yCAAyC,EACzC,wCAAwC,EACxC,gDAAgD,EACh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AgC,CACxC,iDAAiD,EACjD,0CAA0C,CAC3C,GACA,8BAA8B,CAC/B,YAAY,CACV,iDAAiD,EACjD,0CAA0C,CAC3C,EACD,0CAA0C,CAC3C,CAqBA;AAED,wBAAgB,uCAAuC,CACrD,MAAM,EAAE,WAAW,EACnB,YAAY,EAAE;IACZ,EAAE,EAAE,MAAM;IACV,UAAU,EAAE;QACV,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC/B,MAAM,CAAC,EAAE,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"organizationsListFacilityVendors.d.ts","sourceRoot":"","sources":["../../../src/react-query/organizationsListFacilityVendors.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,YAAY,EACZ,sBAAsB,EACtB,WAAW,EAGX,sBAAsB,EAEtB,cAAc,EAEd,8BAA8B,EAE9B,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,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;AAE5D,OAAO,EACL,wBAAwB,EACxB,gBAAgB,EAChB,gCAAgC,EAChC,wBAAwB,EACxB,eAAe,EAChB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,kDAAkD,EAClD,0CAA0C,EAC1C,iDAAiD,EACjD,0CAA0C,EAC1C,yCAAyC,EACzC,wCAAwC,EACxC,gDAAgD,EAChD,wCAAwC,EACxC,gDAAgD,EACjD,MAAM,4CAA4C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,CAAC,GACzE,OAAO,CAAC,IAAI,CAAC,CAUf;AAED,wBAAgB,6CAA6C,CAC3D,MAAM,EAAE,WAAW,EACnB,OAAO,CAAC,EAAE,IAAI,CAAC,sBAAsB,EAAE,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC,GACzE,OAAO,CAAC,IAAI,CAAC,CASf"}
|
|
@@ -41,6 +41,70 @@ export declare class Organizations extends ClientSDK {
|
|
|
41
41
|
listOrSearchDepartments(request: operations.ListOrSearchDepartmentsRequest, options?: RequestOptions): Promise<PageIterator<operations.ListOrSearchDepartmentsResponse, {
|
|
42
42
|
page: number;
|
|
43
43
|
}>>;
|
|
44
|
+
/**
|
|
45
|
+
* List company target facilities
|
|
46
|
+
*
|
|
47
|
+
* @remarks
|
|
48
|
+
* Lists the CompanyTargetFacility links for a company — the facilities the
|
|
49
|
+
* company is targeting. Each row carries the linked facility (with location
|
|
50
|
+
* and parent system), the link status, and per-facility counts of the
|
|
51
|
+
* company's individuals targeting it.
|
|
52
|
+
*
|
|
53
|
+
* When `include_potential_targets=true`, returns ALL non-deleted facilities
|
|
54
|
+
* via a LEFT JOIN. Targeted rows carry their CTF `id` and `status`; non-targeted
|
|
55
|
+
* rows have `id: null` and `status: "Not Targeted"`.
|
|
56
|
+
*
|
|
57
|
+
* Access control: the URL's `company_id` must be in the caller's read scope
|
|
58
|
+
* for Company (a company manager's or vendor's own company, or a company
|
|
59
|
+
* whose app is activated for the API user). Callers outside that scope
|
|
60
|
+
* receive `404 Company not found`.
|
|
61
|
+
*
|
|
62
|
+
* Filter with `has_individual` / `has_active_individual` to drive the
|
|
63
|
+
* facility roster views.
|
|
64
|
+
*
|
|
65
|
+
* Available `expand` scopes are:
|
|
66
|
+
*
|
|
67
|
+
* - company_target_facility.facility
|
|
68
|
+
*/
|
|
69
|
+
listCompanyTargetFacilities(request: operations.ListCompanyTargetFacilitiesRequest, options?: RequestOptions): Promise<PageIterator<operations.ListCompanyTargetFacilitiesResponse, {
|
|
70
|
+
page: number;
|
|
71
|
+
}>>;
|
|
72
|
+
/**
|
|
73
|
+
* Add a company target facility
|
|
74
|
+
*
|
|
75
|
+
* @remarks
|
|
76
|
+
* Links the URL's company to an existing facility. The link is created with
|
|
77
|
+
* status `Pending`. Only the link row is created — the Facility entity
|
|
78
|
+
* itself is never created or modified by this endpoint.
|
|
79
|
+
*
|
|
80
|
+
* Access control: the URL's `company_id` must be in the caller's update
|
|
81
|
+
* scope for Company, AND the `facility_id` must be in the caller's create
|
|
82
|
+
* scope for Facility (a facility on the company's site, or a facility
|
|
83
|
+
* reachable via the API user's site/system/facility-scoped activation).
|
|
84
|
+
* Either being out of scope returns `404 Company not found` /
|
|
85
|
+
* `404 Facility not found` respectively. Deleted facilities also return
|
|
86
|
+
* `404 Facility not found`.
|
|
87
|
+
*
|
|
88
|
+
* Available `expand` scopes are:
|
|
89
|
+
*
|
|
90
|
+
* - company_target_facility.facility
|
|
91
|
+
*/
|
|
92
|
+
createCompanyTargetFacility(request: operations.CreateCompanyTargetFacilityRequest, options?: RequestOptions): Promise<operations.CreateCompanyTargetFacilityCreateCompanyTargetFacilityOk>;
|
|
93
|
+
/**
|
|
94
|
+
* Remove a company target facility
|
|
95
|
+
*
|
|
96
|
+
* @remarks
|
|
97
|
+
* Removes a CompanyTargetFacility link. Blocked when any of the company's
|
|
98
|
+
* individuals still target the same facility (to avoid orphaning their
|
|
99
|
+
* vendor-scoped target rows). Only the link row is removed — the Facility
|
|
100
|
+
* entity itself is never touched.
|
|
101
|
+
*
|
|
102
|
+
* Access control: the URL's `company_id` must be in the caller's update
|
|
103
|
+
* scope for Company (a company manager's or vendor's own company, or a
|
|
104
|
+
* company whose app is activated for the API user). Callers outside that
|
|
105
|
+
* scope receive `404 Company not found`.
|
|
106
|
+
*/
|
|
107
|
+
deleteCompanyTargetFacility(request: operations.DeleteCompanyTargetFacilityRequest, options?: RequestOptions): Promise<boolean>;
|
|
44
108
|
/**
|
|
45
109
|
* Export company target facilities to CSV (async)
|
|
46
110
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizations.d.ts","sourceRoot":"","sources":["../../../src/sdk/organizations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"organizations.d.ts","sourceRoot":"","sources":["../../../src/sdk/organizations.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAwB,MAAM,wBAAwB,CAAC;AAE5E,qBAAa,aAAc,SAAQ,SAAS;IAC1C;;;;;;;;;;;;;;;;;;OAkBG;IACG,sBAAsB,CAC1B,OAAO,EAAE,UAAU,CAAC,6BAA6B,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,YAAY,CAAC,UAAU,CAAC,8BAA8B,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAC1E;IAQD;;;;;OAKG;IACG,WAAW,CACf,OAAO,EAAE,UAAU,CAAC,kBAAkB,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC;IAQ/B;;;;;OAKG;IACG,uBAAuB,CAC3B,OAAO,EAAE,UAAU,CAAC,8BAA8B,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,YAAY,CAAC,UAAU,CAAC,+BAA+B,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAC3E;IAQD;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACG,2BAA2B,CAC/B,OAAO,EAAE,UAAU,CAAC,kCAAkC,EACtD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,YAAY,CACV,UAAU,CAAC,mCAAmC,EAC9C;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CACjB,CAC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4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.Organizations = void 0;
|
|
7
|
+
const organizationsCreateCompanyTargetFacility_js_1 = require("../funcs/organizationsCreateCompanyTargetFacility.js");
|
|
8
|
+
const organizationsDeleteCompanyTargetFacility_js_1 = require("../funcs/organizationsDeleteCompanyTargetFacility.js");
|
|
7
9
|
const organizationsDownloadCompanyTargetFacilitiesExport_js_1 = require("../funcs/organizationsDownloadCompanyTargetFacilitiesExport.js");
|
|
8
10
|
const organizationsExportCompanyTargetFacilities_js_1 = require("../funcs/organizationsExportCompanyTargetFacilities.js");
|
|
9
11
|
const organizationsGetCompanyTargetFacilitiesExportStatus_js_1 = require("../funcs/organizationsGetCompanyTargetFacilitiesExportStatus.js");
|
|
10
12
|
const organizationsGetFacility_js_1 = require("../funcs/organizationsGetFacility.js");
|
|
13
|
+
const organizationsListCompanyTargetFacilities_js_1 = require("../funcs/organizationsListCompanyTargetFacilities.js");
|
|
11
14
|
const organizationsListFacilityVendors_js_1 = require("../funcs/organizationsListFacilityVendors.js");
|
|
12
15
|
const organizationsListOrSearchDepartmentContacts_js_1 = require("../funcs/organizationsListOrSearchDepartmentContacts.js");
|
|
13
16
|
const organizationsListOrSearchDepartments_js_1 = require("../funcs/organizationsListOrSearchDepartments.js");
|
|
@@ -56,6 +59,74 @@ class Organizations extends sdks_js_1.ClientSDK {
|
|
|
56
59
|
async listOrSearchDepartments(request, options) {
|
|
57
60
|
return (0, operations_js_1.unwrapResultIterator)((0, organizationsListOrSearchDepartments_js_1.organizationsListOrSearchDepartments)(this, request, options));
|
|
58
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* List company target facilities
|
|
64
|
+
*
|
|
65
|
+
* @remarks
|
|
66
|
+
* Lists the CompanyTargetFacility links for a company — the facilities the
|
|
67
|
+
* company is targeting. Each row carries the linked facility (with location
|
|
68
|
+
* and parent system), the link status, and per-facility counts of the
|
|
69
|
+
* company's individuals targeting it.
|
|
70
|
+
*
|
|
71
|
+
* When `include_potential_targets=true`, returns ALL non-deleted facilities
|
|
72
|
+
* via a LEFT JOIN. Targeted rows carry their CTF `id` and `status`; non-targeted
|
|
73
|
+
* rows have `id: null` and `status: "Not Targeted"`.
|
|
74
|
+
*
|
|
75
|
+
* Access control: the URL's `company_id` must be in the caller's read scope
|
|
76
|
+
* for Company (a company manager's or vendor's own company, or a company
|
|
77
|
+
* whose app is activated for the API user). Callers outside that scope
|
|
78
|
+
* receive `404 Company not found`.
|
|
79
|
+
*
|
|
80
|
+
* Filter with `has_individual` / `has_active_individual` to drive the
|
|
81
|
+
* facility roster views.
|
|
82
|
+
*
|
|
83
|
+
* Available `expand` scopes are:
|
|
84
|
+
*
|
|
85
|
+
* - company_target_facility.facility
|
|
86
|
+
*/
|
|
87
|
+
async listCompanyTargetFacilities(request, options) {
|
|
88
|
+
return (0, operations_js_1.unwrapResultIterator)((0, organizationsListCompanyTargetFacilities_js_1.organizationsListCompanyTargetFacilities)(this, request, options));
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Add a company target facility
|
|
92
|
+
*
|
|
93
|
+
* @remarks
|
|
94
|
+
* Links the URL's company to an existing facility. The link is created with
|
|
95
|
+
* status `Pending`. Only the link row is created — the Facility entity
|
|
96
|
+
* itself is never created or modified by this endpoint.
|
|
97
|
+
*
|
|
98
|
+
* Access control: the URL's `company_id` must be in the caller's update
|
|
99
|
+
* scope for Company, AND the `facility_id` must be in the caller's create
|
|
100
|
+
* scope for Facility (a facility on the company's site, or a facility
|
|
101
|
+
* reachable via the API user's site/system/facility-scoped activation).
|
|
102
|
+
* Either being out of scope returns `404 Company not found` /
|
|
103
|
+
* `404 Facility not found` respectively. Deleted facilities also return
|
|
104
|
+
* `404 Facility not found`.
|
|
105
|
+
*
|
|
106
|
+
* Available `expand` scopes are:
|
|
107
|
+
*
|
|
108
|
+
* - company_target_facility.facility
|
|
109
|
+
*/
|
|
110
|
+
async createCompanyTargetFacility(request, options) {
|
|
111
|
+
return (0, fp_js_1.unwrapAsync)((0, organizationsCreateCompanyTargetFacility_js_1.organizationsCreateCompanyTargetFacility)(this, request, options));
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Remove a company target facility
|
|
115
|
+
*
|
|
116
|
+
* @remarks
|
|
117
|
+
* Removes a CompanyTargetFacility link. Blocked when any of the company's
|
|
118
|
+
* individuals still target the same facility (to avoid orphaning their
|
|
119
|
+
* vendor-scoped target rows). Only the link row is removed — the Facility
|
|
120
|
+
* entity itself is never touched.
|
|
121
|
+
*
|
|
122
|
+
* Access control: the URL's `company_id` must be in the caller's update
|
|
123
|
+
* scope for Company (a company manager's or vendor's own company, or a
|
|
124
|
+
* company whose app is activated for the API user). Callers outside that
|
|
125
|
+
* scope receive `404 Company not found`.
|
|
126
|
+
*/
|
|
127
|
+
async deleteCompanyTargetFacility(request, options) {
|
|
128
|
+
return (0, fp_js_1.unwrapAsync)((0, organizationsDeleteCompanyTargetFacility_js_1.organizationsDeleteCompanyTargetFacility)(this, request, options));
|
|
129
|
+
}
|
|
59
130
|
/**
|
|
60
131
|
* Export company target facilities to CSV (async)
|
|
61
132
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizations.js","sourceRoot":"","sources":["../../../src/sdk/organizations.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,0IAAoI;AACpI,0HAAoH;AACpH,4IAAsI;AACtI,sFAAgF;AAChF,sGAAgG;AAChG,4HAAsH;AACtH,8GAAwG;AACxG,4GAAsG;AACtG,4CAA2D;AAG3D,0CAA6C;AAC7C,0DAA4E;AAE5E,MAAa,aAAc,SAAQ,mBAAS;IAC1C;;;;;;;;;;;;;;;;;;OAkBG;IACH,KAAK,CAAC,sBAAsB,CAC1B,OAAiD,EACjD,OAAwB;QAIxB,OAAO,IAAA,oCAAoB,EAAC,IAAA,4EAAmC,EAC7D,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CA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AI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;
|
|
1
|
+
{"version":3,"file":"organizations.js","sourceRoot":"","sources":["../../../src/sdk/organizations.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,sHAAgH;AAChH,sHAAgH;AAChH,0IAAoI;AACpI,0HAAoH;AACpH,4IAAsI;AACtI,sFAAgF;AAChF,sHAAgH;AAChH,sGAAgG;AAChG,4HAAsH;AACtH,8GAAwG;AACxG,4GAAsG;AACtG,4CAA2D;AAG3D,0CAA6C;AAC7C,0DAA4E;AAE5E,MAAa,aAAc,SAAQ,mBAAS;IAC1C;;;;;;;;;;;;;;;;;;OAkBG;IACH,KAAK,CAAC,sBAAsB,CAC1B,OAAiD,EACjD,OAAwB;QAIxB,OAAO,IAAA,oCAAoB,EAAC,IAAA,4EAAmC,EAC7D,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,WAAW,CACf,OAAsC,EACtC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,sDAAwB,EACzC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,uBAAuB,CAC3B,OAAkD,EAClD,OAAwB;QAIxB,OAAO,IAAA,oCAAoB,EAAC,IAAA,8EAAoC,EAC9D,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,KAAK,CAAC,2BAA2B,CAC/B,OAAsD,EACtD,OAAwB;QAOxB,OAAO,IAAA,oCAAoB,EAAC,IAAA,sFAAwC,EAClE,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,KAAK,CAAC,2BAA2B,CAC/B,OAAsD,EACtD,OA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ACF;AAtSD,sCAsSC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { expect, test } from "vitest";
|
|
5
5
|
import { GreenSecurity } from "../index.js";
|
|
6
6
|
import { createTestHTTPClient } from "./testclient.js";
|
|
7
7
|
test("Organizations List Or Search Departments", async () => {
|
|
@@ -76,14 +76,80 @@ test("Organizations List Or Search Department Contacts", async () => {
|
|
|
76
76
|
],
|
|
77
77
|
});
|
|
78
78
|
});
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
test("Organizations List Company Target Facilities", async () => {
|
|
80
|
+
const testHttpClient = createTestHTTPClient("listCompanyTargetFacilities");
|
|
81
|
+
const greenSecurity = new GreenSecurity({
|
|
82
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "https://localhost:3000/api",
|
|
83
|
+
httpClient: testHttpClient,
|
|
84
|
+
security: {
|
|
85
|
+
token: process.env["GREEN_SECURITY_TOKEN"] ?? "value",
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
const result = await greenSecurity.organizations.listCompanyTargetFacilities({
|
|
89
|
+
companyId: 864839,
|
|
90
|
+
expand: [
|
|
91
|
+
"facility.system",
|
|
92
|
+
],
|
|
93
|
+
desc: true,
|
|
94
|
+
itemsPerPage: 25,
|
|
95
|
+
});
|
|
96
|
+
expect(result).toBeDefined();
|
|
97
|
+
expect(result.result).toBeDefined();
|
|
98
|
+
expect(result.result).toEqual({
|
|
99
|
+
pager: {
|
|
100
|
+
baseUrl: "api/vendors/job_titles",
|
|
101
|
+
sort: "job,title",
|
|
102
|
+
desc: 0,
|
|
103
|
+
itemCount: 228,
|
|
104
|
+
itemsPerPage: 112555,
|
|
105
|
+
page: 1,
|
|
106
|
+
useUrlParams: true,
|
|
107
|
+
},
|
|
108
|
+
items: [],
|
|
109
|
+
});
|
|
81
110
|
});
|
|
82
|
-
|
|
83
|
-
|
|
111
|
+
test("Organizations Create Company Target Facility", async () => {
|
|
112
|
+
const testHttpClient = createTestHTTPClient("createCompanyTargetFacility");
|
|
113
|
+
const greenSecurity = new GreenSecurity({
|
|
114
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "https://localhost:3000/api",
|
|
115
|
+
httpClient: testHttpClient,
|
|
116
|
+
security: {
|
|
117
|
+
token: process.env["GREEN_SECURITY_TOKEN"] ?? "value",
|
|
118
|
+
},
|
|
119
|
+
});
|
|
120
|
+
const result = await greenSecurity.organizations.createCompanyTargetFacility({
|
|
121
|
+
companyId: 846108,
|
|
122
|
+
expand: [
|
|
123
|
+
"facility.system",
|
|
124
|
+
],
|
|
125
|
+
requestBody: {
|
|
126
|
+
facilityId: 253646,
|
|
127
|
+
},
|
|
128
|
+
});
|
|
129
|
+
expect(result).toBeDefined();
|
|
130
|
+
expect(result).toEqual({
|
|
131
|
+
companyTargetFacility: {
|
|
132
|
+
id: 335466,
|
|
133
|
+
facility: 582706,
|
|
134
|
+
status: "<value>",
|
|
135
|
+
},
|
|
136
|
+
});
|
|
84
137
|
});
|
|
85
|
-
|
|
86
|
-
|
|
138
|
+
test("Organizations Delete Company Target Facility", async () => {
|
|
139
|
+
const testHttpClient = createTestHTTPClient("deleteCompanyTargetFacility");
|
|
140
|
+
const greenSecurity = new GreenSecurity({
|
|
141
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "https://localhost:3000/api",
|
|
142
|
+
httpClient: testHttpClient,
|
|
143
|
+
security: {
|
|
144
|
+
token: process.env["GREEN_SECURITY_TOKEN"] ?? "value",
|
|
145
|
+
},
|
|
146
|
+
});
|
|
147
|
+
const result = await greenSecurity.organizations.deleteCompanyTargetFacility({
|
|
148
|
+
companyId: 56711,
|
|
149
|
+
id: 304723,
|
|
150
|
+
});
|
|
151
|
+
expect(result).toBeDefined();
|
|
152
|
+
expect(result).toEqual(true);
|
|
87
153
|
});
|
|
88
154
|
test("Organizations Export Company Target Facilities", async () => {
|
|
89
155
|
const testHttpClient = createTestHTTPClient("exportCompanyTargetFacilities");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizations.test.js","sourceRoot":"","sources":["../../../src/__tests__/organizations.test.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"organizations.test.js","sourceRoot":"","sources":["../../../src/__tests__/organizations.test.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvD,IAAI,CAAC,0CAA0C,EAAE,KAAK,IAAI,EAAE;IAC1D,MAAM,cAAc,GAAG,oBAAoB,CAAC,yBAAyB,CAAC,CAAC;IAEvE,MAAM,aAAa,GAAG,IAAI,aAAa,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,MAAM,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;IAC7B,MAAM,CAAC,MAAO,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;IACrC,MAAM,CAAC,MAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC;QAC7B,KAAK,EAAE;YACL,OAAO,E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,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,MAAM,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;IAC7B,MAAM,CAAC,MAAO,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;IACrC,MAAM,CAAC,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"}
|
|
@@ -16,7 +16,7 @@ test("Webhooks List All Webhook Endpoints", async () => {
|
|
|
16
16
|
const testWebhookListForVendorUserResult = await greenSecurity.webhooks
|
|
17
17
|
.listAllWebhookEndpoints({
|
|
18
18
|
itemsPerPage: 25,
|
|
19
|
-
desc:
|
|
19
|
+
desc: true,
|
|
20
20
|
sort: "",
|
|
21
21
|
});
|
|
22
22
|
expect(testWebhookListForVendorUserResult).toBeDefined();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.test.js","sourceRoot":"","sources":["../../../src/__tests__/webhooks.test.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvD,IAAI,CAAC,qCA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,EAAE,CAAC;gBACX,UAAU,EAAE,CAAC;gBACb,SAAS,EAAE,CAAC;gBACZ,MAAM,EAAE,CAAC;aACV;SACF;KACF,CAAC,CAAC;IACL,MAAM,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;IAC7B,MAAM,CAAC,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"}
|
|
@@ -36,7 +36,7 @@ test("Zones List Or Search Security Zones", async () => {
|
|
|
36
36
|
contacts: {
|
|
37
37
|
contact: {
|
|
38
38
|
status: "Active",
|
|
39
|
-
department:
|
|
39
|
+
department: 123,
|
|
40
40
|
},
|
|
41
41
|
adminContact: {
|
|
42
42
|
status: "Deleted",
|
|
@@ -47,7 +47,7 @@ test("Zones List Or Search Security Zones", async () => {
|
|
|
47
47
|
department: 123,
|
|
48
48
|
},
|
|
49
49
|
greenSecurityCsm: {
|
|
50
|
-
status: "
|
|
50
|
+
status: "Deleted",
|
|
51
51
|
department: 123,
|
|
52
52
|
},
|
|
53
53
|
accountManager: {
|
|
@@ -56,14 +56,42 @@ test("Zones List Or Search Security Zones", async () => {
|
|
|
56
56
|
},
|
|
57
57
|
},
|
|
58
58
|
vendorGuestPolicy: {
|
|
59
|
-
enabled:
|
|
59
|
+
enabled: true,
|
|
60
60
|
vendorGuestLimitAndOr: "and",
|
|
61
|
-
vendorGuestRequireEmail:
|
|
61
|
+
vendorGuestRequireEmail: true,
|
|
62
62
|
},
|
|
63
63
|
},
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
|
-
facility: {
|
|
66
|
+
facility: {
|
|
67
|
+
contacts: {
|
|
68
|
+
contact: {
|
|
69
|
+
status: "Active",
|
|
70
|
+
department: 123,
|
|
71
|
+
},
|
|
72
|
+
adminContact: {
|
|
73
|
+
status: "Deleted",
|
|
74
|
+
department: null,
|
|
75
|
+
},
|
|
76
|
+
techContact: {
|
|
77
|
+
status: "Inactive",
|
|
78
|
+
department: 123,
|
|
79
|
+
},
|
|
80
|
+
greenSecurityCsm: {
|
|
81
|
+
status: "Deleted",
|
|
82
|
+
department: 123,
|
|
83
|
+
},
|
|
84
|
+
accountManager: {
|
|
85
|
+
status: "Active",
|
|
86
|
+
department: 123,
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
vendorGuestPolicy: {
|
|
90
|
+
enabled: true,
|
|
91
|
+
vendorGuestLimitAndOr: "and",
|
|
92
|
+
vendorGuestRequireEmail: true,
|
|
93
|
+
},
|
|
94
|
+
},
|
|
67
95
|
},
|
|
68
96
|
],
|
|
69
97
|
});
|
|
@@ -79,7 +107,7 @@ test("Zones Security Zone Checkin", async () => {
|
|
|
79
107
|
});
|
|
80
108
|
const result = await greenSecurity.zones.securityZoneCheckin({
|
|
81
109
|
qrCode: "<value>",
|
|
82
|
-
zoneId:
|
|
110
|
+
zoneId: 290531,
|
|
83
111
|
});
|
|
84
112
|
expect(result).toBeDefined();
|
|
85
113
|
expect(result).toEqual({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zones.test.js","sourceRoot":"","sources":["../../../src/__tests__/zones.test.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvD,IAAI,CAAC,qCAAqC,EAAE,KAAK,IAAI,EAAE;IACrD,MAAM,cAAc,GAAG,oBAAoB,CAAC,2BAA2B,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AAM;KACf,CAAC,CAAC;IACH,MAAM,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;IAC7B,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;AAC7B,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,yBAAyB,EAAE,KAAK,IAAI,EAAE;IACzC,MAAM,cAAc,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;IAE/D,MAAM,aAAa,GAAG,IAAI,aAAa,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,MAAM,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;IAC7B,MAAM,CAAC,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,109 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
5
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
6
|
+
import * as M from "../lib/matchers.js";
|
|
7
|
+
import { compactMap } from "../lib/primitives.js";
|
|
8
|
+
import { safeParse } from "../lib/schemas.js";
|
|
9
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
10
|
+
import { pathToFunc } from "../lib/url.js";
|
|
11
|
+
import * as errors from "../models/errors/index.js";
|
|
12
|
+
import * as operations from "../models/operations/index.js";
|
|
13
|
+
import { APIPromise } from "../types/async.js";
|
|
14
|
+
/**
|
|
15
|
+
* Add a company target facility
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* Links the URL's company to an existing facility. The link is created with
|
|
19
|
+
* status `Pending`. Only the link row is created — the Facility entity
|
|
20
|
+
* itself is never created or modified by this endpoint.
|
|
21
|
+
*
|
|
22
|
+
* Access control: the URL's `company_id` must be in the caller's update
|
|
23
|
+
* scope for Company, AND the `facility_id` must be in the caller's create
|
|
24
|
+
* scope for Facility (a facility on the company's site, or a facility
|
|
25
|
+
* reachable via the API user's site/system/facility-scoped activation).
|
|
26
|
+
* Either being out of scope returns `404 Company not found` /
|
|
27
|
+
* `404 Facility not found` respectively. Deleted facilities also return
|
|
28
|
+
* `404 Facility not found`.
|
|
29
|
+
*
|
|
30
|
+
* Available `expand` scopes are:
|
|
31
|
+
*
|
|
32
|
+
* - company_target_facility.facility
|
|
33
|
+
*
|
|
34
|
+
* If set, this operation will use {@link Security.bearerJwt} from the global security.
|
|
35
|
+
*/
|
|
36
|
+
export function organizationsCreateCompanyTargetFacility(client, request, options) {
|
|
37
|
+
return new APIPromise($do(client, request, options));
|
|
38
|
+
}
|
|
39
|
+
async function $do(client, request, options) {
|
|
40
|
+
const parsed = safeParse(request, (value) => operations.CreateCompanyTargetFacilityRequest$outboundSchema.parse(value), "Input validation failed");
|
|
41
|
+
if (!parsed.ok) {
|
|
42
|
+
return [parsed, { status: "invalid" }];
|
|
43
|
+
}
|
|
44
|
+
const payload = parsed.value;
|
|
45
|
+
const body = encodeJSON("body", payload.RequestBody, { explode: true });
|
|
46
|
+
const pathParams = {
|
|
47
|
+
company_id: encodeSimple("company_id", payload.company_id, {
|
|
48
|
+
explode: false,
|
|
49
|
+
charEncoding: "percent",
|
|
50
|
+
}),
|
|
51
|
+
};
|
|
52
|
+
const path = pathToFunc("/companies/{company_id}/target-facilities")(pathParams);
|
|
53
|
+
const query = encodeFormQuery({
|
|
54
|
+
"expand": payload.expand,
|
|
55
|
+
}, { explode: false });
|
|
56
|
+
const headers = new Headers(compactMap({
|
|
57
|
+
"Content-Type": "application/json",
|
|
58
|
+
Accept: "application/json",
|
|
59
|
+
}));
|
|
60
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
61
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [1]);
|
|
62
|
+
const context = {
|
|
63
|
+
options: client._options,
|
|
64
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
65
|
+
operationID: "createCompanyTargetFacility",
|
|
66
|
+
oAuth2Scopes: null,
|
|
67
|
+
resolvedSecurity: requestSecurity,
|
|
68
|
+
securitySource: client._options.security,
|
|
69
|
+
retryConfig: options?.retries
|
|
70
|
+
|| client._options.retryConfig
|
|
71
|
+
|| { strategy: "none" },
|
|
72
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
73
|
+
};
|
|
74
|
+
const requestRes = client._createRequest(context, {
|
|
75
|
+
security: requestSecurity,
|
|
76
|
+
method: "POST",
|
|
77
|
+
baseURL: options?.serverURL,
|
|
78
|
+
path: path,
|
|
79
|
+
headers: headers,
|
|
80
|
+
query: query,
|
|
81
|
+
body: body,
|
|
82
|
+
userAgent: client._options.userAgent,
|
|
83
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
84
|
+
}, options);
|
|
85
|
+
if (!requestRes.ok) {
|
|
86
|
+
return [requestRes, { status: "invalid" }];
|
|
87
|
+
}
|
|
88
|
+
const req = requestRes.value;
|
|
89
|
+
const doResult = await client._do(req, {
|
|
90
|
+
context,
|
|
91
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
92
|
+
retryConfig: context.retryConfig,
|
|
93
|
+
retryCodes: context.retryCodes,
|
|
94
|
+
});
|
|
95
|
+
if (!doResult.ok) {
|
|
96
|
+
return [doResult, { status: "request-error", request: req }];
|
|
97
|
+
}
|
|
98
|
+
const response = doResult.value;
|
|
99
|
+
const responseFields = {
|
|
100
|
+
HttpMeta: { Response: response, Request: req },
|
|
101
|
+
};
|
|
102
|
+
const [result] = await M.match(M.json(201, operations
|
|
103
|
+
.CreateCompanyTargetFacilityCreateCompanyTargetFacilityOk$inboundSchema), M.jsonErr([400, 401, 403, 404, 422], errors.ApiErrorResponse$inboundSchema), M.fail("4XX"), M.fail([500, "5XX"]))(response, req, { extraFields: responseFields });
|
|
104
|
+
if (!result.ok) {
|
|
105
|
+
return [result, { status: "complete", request: req, response }];
|
|
106
|
+
}
|
|
107
|
+
return [result, { status: "complete", request: req, response }];
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=organizationsCreateCompanyTargetFacility.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organizationsCreateCompanyTargetFacility.js","sourceRoot":"","sources":["../../../src/funcs/organizationsCreateCompanyTargetFacility.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,CAAC,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAS3C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AAGpD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGxD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,wCAAwC,CACtD,MAAyB,EAC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