@oystehr/sdk 3.0.5 → 3.0.7
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 +24 -8
- package/dist/cjs/client/client.d.ts +1 -1
- package/dist/cjs/config.d.ts +5 -0
- package/dist/cjs/errors/index.d.ts +4 -1
- package/dist/cjs/index.cjs +255 -92
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.min.cjs +1 -1
- package/dist/cjs/index.min.cjs.map +1 -1
- package/dist/cjs/resources/classes/application.d.ts +1 -0
- package/dist/cjs/resources/classes/charge.d.ts +1 -0
- package/dist/cjs/resources/classes/conversation.d.ts +1 -0
- package/dist/cjs/resources/classes/developer.d.ts +1 -0
- package/dist/cjs/resources/classes/erx.d.ts +10 -1
- package/dist/cjs/resources/classes/fax.d.ts +31 -0
- package/dist/cjs/resources/classes/fhir.d.ts +1 -0
- package/dist/cjs/resources/classes/index.d.ts +2 -0
- package/dist/cjs/resources/classes/m2m.d.ts +1 -0
- package/dist/cjs/resources/classes/messaging.d.ts +1 -0
- package/dist/cjs/resources/classes/paymentMethod.d.ts +1 -0
- package/dist/cjs/resources/classes/project.d.ts +1 -0
- package/dist/cjs/resources/classes/rcm.d.ts +2 -1
- package/dist/cjs/resources/classes/role.d.ts +1 -0
- package/dist/cjs/resources/classes/secret.d.ts +1 -0
- package/dist/cjs/resources/classes/telemed.d.ts +1 -0
- package/dist/cjs/resources/classes/transactionalSMS.d.ts +1 -0
- package/dist/cjs/resources/classes/user.d.ts +1 -0
- package/dist/cjs/resources/classes/version.d.ts +1 -0
- package/dist/cjs/resources/classes/z3.d.ts +1 -0
- package/dist/cjs/resources/classes/zambda.d.ts +1 -0
- package/dist/cjs/resources/classes/zambdaLogStream.d.ts +1 -0
- package/dist/cjs/resources/types/DeveloperInviteResponse.d.ts +0 -4
- package/dist/cjs/resources/types/ErxCancelOrderParams.d.ts +6 -0
- package/dist/cjs/resources/types/ErxCancelOrderResponse.d.ts +6 -0
- package/dist/cjs/resources/types/ErxCancelPrescriptionParams.d.ts +6 -0
- package/dist/cjs/resources/types/ErxCancelPrescriptionResponse.d.ts +6 -0
- package/dist/cjs/resources/types/FaxSendParams.d.ts +18 -0
- package/dist/cjs/resources/types/FaxSendResponse.d.ts +10 -0
- package/dist/cjs/resources/types/index.d.ts +6 -0
- package/dist/cjs/tests/setup/constants.d.ts +2 -6
- package/dist/cjs/tests/setup/global.d.ts +1 -0
- package/dist/esm/client/client.d.ts +1 -1
- package/dist/esm/client/client.js +4 -4
- package/dist/esm/client/client.js.map +1 -1
- package/dist/esm/config.d.ts +5 -0
- package/dist/esm/errors/index.d.ts +4 -1
- package/dist/esm/errors/index.js +18 -2
- package/dist/esm/errors/index.js.map +1 -1
- package/dist/esm/index.min.js +1 -1
- package/dist/esm/index.min.js.map +1 -1
- package/dist/esm/resources/classes/application.d.ts +1 -0
- package/dist/esm/resources/classes/application.js +12 -8
- package/dist/esm/resources/classes/application.js.map +1 -1
- package/dist/esm/resources/classes/charge.d.ts +1 -0
- package/dist/esm/resources/classes/charge.js +6 -2
- package/dist/esm/resources/classes/charge.js.map +1 -1
- package/dist/esm/resources/classes/conversation.d.ts +1 -0
- package/dist/esm/resources/classes/conversation.js +9 -5
- package/dist/esm/resources/classes/conversation.js.map +1 -1
- package/dist/esm/resources/classes/developer.d.ts +1 -0
- package/dist/esm/resources/classes/developer.js +10 -6
- package/dist/esm/resources/classes/developer.js.map +1 -1
- package/dist/esm/resources/classes/erx.d.ts +10 -1
- package/dist/esm/resources/classes/erx.js +20 -4
- package/dist/esm/resources/classes/erx.js.map +1 -1
- package/dist/esm/resources/classes/fax.d.ts +31 -0
- package/dist/esm/resources/classes/fax.js +45 -0
- package/dist/esm/resources/classes/fax.js.map +1 -0
- package/dist/esm/resources/classes/fhir.d.ts +1 -0
- package/dist/esm/resources/classes/fhir.js +4 -0
- package/dist/esm/resources/classes/fhir.js.map +1 -1
- package/dist/esm/resources/classes/index.d.ts +2 -0
- package/dist/esm/resources/classes/index.js +7 -0
- package/dist/esm/resources/classes/index.js.map +1 -1
- package/dist/esm/resources/classes/m2m.d.ts +1 -0
- package/dist/esm/resources/classes/m2m.js +11 -7
- package/dist/esm/resources/classes/m2m.js.map +1 -1
- package/dist/esm/resources/classes/messaging.d.ts +1 -0
- package/dist/esm/resources/classes/messaging.js +5 -1
- package/dist/esm/resources/classes/messaging.js.map +1 -1
- package/dist/esm/resources/classes/paymentMethod.d.ts +1 -0
- package/dist/esm/resources/classes/paymentMethod.js +8 -4
- package/dist/esm/resources/classes/paymentMethod.js.map +1 -1
- package/dist/esm/resources/classes/project.d.ts +1 -0
- package/dist/esm/resources/classes/project.js +6 -2
- package/dist/esm/resources/classes/project.js.map +1 -1
- package/dist/esm/resources/classes/rcm.d.ts +2 -1
- package/dist/esm/resources/classes/rcm.js +8 -4
- package/dist/esm/resources/classes/rcm.js.map +1 -1
- package/dist/esm/resources/classes/role.d.ts +1 -0
- package/dist/esm/resources/classes/role.js +9 -5
- package/dist/esm/resources/classes/role.js.map +1 -1
- package/dist/esm/resources/classes/secret.d.ts +1 -0
- package/dist/esm/resources/classes/secret.js +8 -4
- package/dist/esm/resources/classes/secret.js.map +1 -1
- package/dist/esm/resources/classes/telemed.d.ts +1 -0
- package/dist/esm/resources/classes/telemed.js +6 -2
- package/dist/esm/resources/classes/telemed.js.map +1 -1
- package/dist/esm/resources/classes/transactionalSMS.d.ts +1 -0
- package/dist/esm/resources/classes/transactionalSMS.js +5 -1
- package/dist/esm/resources/classes/transactionalSMS.js.map +1 -1
- package/dist/esm/resources/classes/user.d.ts +1 -0
- package/dist/esm/resources/classes/user.js +11 -7
- package/dist/esm/resources/classes/user.js.map +1 -1
- package/dist/esm/resources/classes/version.d.ts +1 -0
- package/dist/esm/resources/classes/version.js +5 -1
- package/dist/esm/resources/classes/version.js.map +1 -1
- package/dist/esm/resources/classes/z3-ext.js +9 -5
- package/dist/esm/resources/classes/z3-ext.js.map +1 -1
- package/dist/esm/resources/classes/z3.d.ts +1 -0
- package/dist/esm/resources/classes/z3.js +10 -6
- package/dist/esm/resources/classes/z3.js.map +1 -1
- package/dist/esm/resources/classes/zambda-ext.js +5 -1
- package/dist/esm/resources/classes/zambda-ext.js.map +1 -1
- package/dist/esm/resources/classes/zambda.d.ts +1 -0
- package/dist/esm/resources/classes/zambda.js +12 -8
- package/dist/esm/resources/classes/zambda.js.map +1 -1
- package/dist/esm/resources/classes/zambdaLogStream.d.ts +1 -0
- package/dist/esm/resources/classes/zambdaLogStream.js +7 -3
- package/dist/esm/resources/classes/zambdaLogStream.js.map +1 -1
- package/dist/esm/resources/types/DeveloperInviteResponse.d.ts +0 -4
- package/dist/esm/resources/types/ErxCancelOrderParams.d.ts +6 -0
- package/dist/esm/resources/types/ErxCancelOrderResponse.d.ts +6 -0
- package/dist/esm/resources/types/ErxCancelPrescriptionParams.d.ts +6 -0
- package/dist/esm/resources/types/ErxCancelPrescriptionResponse.d.ts +6 -0
- package/dist/esm/resources/types/FaxSendParams.d.ts +18 -0
- package/dist/esm/resources/types/FaxSendResponse.d.ts +10 -0
- package/dist/esm/resources/types/index.d.ts +6 -0
- package/dist/esm/tests/setup/constants.d.ts +2 -6
- package/dist/esm/tests/setup/global.d.ts +1 -0
- package/package.json +4 -4
- package/src/client/client.ts +6 -6
- package/src/config.ts +5 -0
- package/src/errors/index.ts +18 -2
- package/src/resources/classes/application.ts +15 -8
- package/src/resources/classes/charge.ts +5 -2
- package/src/resources/classes/conversation.ts +20 -5
- package/src/resources/classes/developer.ts +9 -6
- package/src/resources/classes/erx.ts +26 -4
- package/src/resources/classes/fax.ts +44 -0
- package/src/resources/classes/fhir.ts +3 -0
- package/src/resources/classes/index.ts +6 -0
- package/src/resources/classes/m2m.ts +10 -7
- package/src/resources/classes/messaging.ts +4 -1
- package/src/resources/classes/paymentMethod.ts +7 -4
- package/src/resources/classes/project.ts +5 -2
- package/src/resources/classes/rcm.ts +7 -4
- package/src/resources/classes/role.ts +8 -5
- package/src/resources/classes/secret.ts +7 -4
- package/src/resources/classes/telemed.ts +5 -2
- package/src/resources/classes/transactionalSMS.ts +4 -1
- package/src/resources/classes/user.ts +10 -7
- package/src/resources/classes/version.ts +4 -1
- package/src/resources/classes/z3-ext.ts +10 -4
- package/src/resources/classes/z3.ts +9 -6
- package/src/resources/classes/zambda-ext.ts +5 -1
- package/src/resources/classes/zambda.ts +11 -8
- package/src/resources/classes/zambdaLogStream.ts +10 -3
- package/src/resources/types/DeveloperInviteResponse.ts +0 -4
- package/src/resources/types/ErxCancelOrderParams.ts +8 -0
- package/src/resources/types/ErxCancelOrderResponse.ts +8 -0
- package/src/resources/types/ErxCancelPrescriptionParams.ts +8 -0
- package/src/resources/types/ErxCancelPrescriptionResponse.ts +8 -0
- package/src/resources/types/FaxSendParams.ts +20 -0
- package/src/resources/types/FaxSendResponse.ts +12 -0
- package/src/resources/types/index.ts +6 -0
- /package/dist/cjs/tests/{common.d.ts → integrational/common.d.ts} +0 -0
- /package/dist/esm/tests/{common.d.ts → integrational/common.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secret.js","sources":["../../../../src/resources/classes/secret.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n OystehrClientRequest,\n SecretDeleteParams,\n SecretGetParams,\n SecretGetResponse,\n SecretListResponse,\n SecretSetParams,\n SecretSetResponse,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class Secret extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n /**\n * Get a list of all secrets in the Project.\n *\n * Access Policy Action: `Zambda:ListAllSecrets`\n * Access Policy Resource: `Zambda:Secret`\n */\n list(request?: OystehrClientRequest): Promise<SecretListResponse> {\n return this.request('/secret', 'get')(request);\n }\n /**\n * Create a secret for a project. If the secret is already defined, update it.\n *\n * Access Policy Action: `Zambda:CreateSecret`\n * Access Policy Resource: `Zambda:Secret`\n */\n set(params: SecretSetParams, request?: OystehrClientRequest): Promise<SecretSetResponse> {\n return this.request('/secret', 'post')(params, request);\n }\n /**\n * Get the secret with the provided name.\n *\n * Access Policy Action: `Zambda:GetSecret`\n * Access Policy Resource: `Zambda:Secret`\n */\n get(params: SecretGetParams, request?: OystehrClientRequest): Promise<SecretGetResponse> {\n return this.request('/secret/{name}', 'get')(params, request);\n }\n /**\n * Delete the secret with the provided name.\n *\n * Access Policy Action: `Zambda:DeleteSecret`\n * Access Policy Resource: `Zambda:Secret`\n */\n delete(params: SecretDeleteParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/secret/{name}', 'delete')(params, request);\n }\n}\n"],"names":[],"mappings":";;AAAA;AAcM,MAAO,MAAO,SAAQ,WAAW,CAAA;AACrC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;KACf;AACD;;;;;AAKG;AACH,IAAA,IAAI,CAAC,OAA8B,EAAA;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"secret.js","sources":["../../../../src/resources/classes/secret.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n OystehrClientRequest,\n SecretDeleteParams,\n SecretGetParams,\n SecretGetResponse,\n SecretListResponse,\n SecretSetParams,\n SecretSetResponse,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class Secret extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n baseUrlThunk(): string {\n return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';\n }\n /**\n * Get a list of all secrets in the Project.\n *\n * Access Policy Action: `Zambda:ListAllSecrets`\n * Access Policy Resource: `Zambda:Secret`\n */\n list(request?: OystehrClientRequest): Promise<SecretListResponse> {\n return this.request('/secret', 'get', this.baseUrlThunk.bind(this))(request);\n }\n /**\n * Create a secret for a project. If the secret is already defined, update it.\n *\n * Access Policy Action: `Zambda:CreateSecret`\n * Access Policy Resource: `Zambda:Secret`\n */\n set(params: SecretSetParams, request?: OystehrClientRequest): Promise<SecretSetResponse> {\n return this.request('/secret', 'post', this.baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Get the secret with the provided name.\n *\n * Access Policy Action: `Zambda:GetSecret`\n * Access Policy Resource: `Zambda:Secret`\n */\n get(params: SecretGetParams, request?: OystehrClientRequest): Promise<SecretGetResponse> {\n return this.request('/secret/{name}', 'get', this.baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Delete the secret with the provided name.\n *\n * Access Policy Action: `Zambda:DeleteSecret`\n * Access Policy Resource: `Zambda:Secret`\n */\n delete(params: SecretDeleteParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/secret/{name}', 'delete', this.baseUrlThunk.bind(this))(params, request);\n }\n}\n"],"names":[],"mappings":";;AAAA;AAcM,MAAO,MAAO,SAAQ,WAAW,CAAA;AACrC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;KACf;IACD,YAAY,GAAA;;AACV,QAAA,OAAO,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAG,eAAe,CAAC,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,mCAAmC,CAAC;KACvF;AACD;;;;;AAKG;AACH,IAAA,IAAI,CAAC,OAA8B,EAAA;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;KAC9E;AACD;;;;;AAKG;IACH,GAAG,CAAC,MAAuB,EAAE,OAA8B,EAAA;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACvF;AACD;;;;;AAKG;IACH,GAAG,CAAC,MAAuB,EAAE,OAA8B,EAAA;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC7F;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAA0B,EAAE,OAA8B,EAAA;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,QAAQ,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAChG;AACF;;;;"}
|
|
@@ -3,6 +3,7 @@ import { SDKResource } from '../../client/client';
|
|
|
3
3
|
import { OystehrConfig } from '../../config';
|
|
4
4
|
export declare class Telemed extends SDKResource {
|
|
5
5
|
constructor(config: OystehrConfig);
|
|
6
|
+
baseUrlThunk(): string;
|
|
6
7
|
/**
|
|
7
8
|
* Create a [telemedicine video meeting](https://docs.oystehr.com/services/telemed/).
|
|
8
9
|
*
|
|
@@ -5,6 +5,10 @@ class Telemed extends SDKResource {
|
|
|
5
5
|
constructor(config) {
|
|
6
6
|
super(config);
|
|
7
7
|
}
|
|
8
|
+
baseUrlThunk() {
|
|
9
|
+
var _a, _b;
|
|
10
|
+
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
|
|
11
|
+
}
|
|
8
12
|
/**
|
|
9
13
|
* Create a [telemedicine video meeting](https://docs.oystehr.com/services/telemed/).
|
|
10
14
|
*
|
|
@@ -17,7 +21,7 @@ class Telemed extends SDKResource {
|
|
|
17
21
|
* Access Policy Resource: `FHIR:Encounter`
|
|
18
22
|
*/
|
|
19
23
|
createMeeting(params, request) {
|
|
20
|
-
return this.request('/telemed/v2/meeting', 'post')(params, request);
|
|
24
|
+
return this.request('/telemed/v2/meeting', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
21
25
|
}
|
|
22
26
|
/**
|
|
23
27
|
* Get Meeting and Attendee objects necessary to join a telemedicine video meeting.
|
|
@@ -30,7 +34,7 @@ class Telemed extends SDKResource {
|
|
|
30
34
|
* Access Policy Resource: `Telemed:Meeting`
|
|
31
35
|
*/
|
|
32
36
|
joinMeeting(params, request) {
|
|
33
|
-
return this.request('/telemed/v2/meeting/{encounterId}/join', 'get')(params, request);
|
|
37
|
+
return this.request('/telemed/v2/meeting/{encounterId}/join', 'get', this.baseUrlThunk.bind(this))(params, request);
|
|
34
38
|
}
|
|
35
39
|
}
|
|
36
40
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemed.js","sources":["../../../../src/resources/classes/telemed.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n OystehrClientRequest,\n TelemedCreateMeetingParams,\n TelemedCreateMeetingResponse,\n TelemedJoinMeetingParams,\n TelemedJoinMeetingResponse,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class Telemed extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n /**\n * Create a [telemedicine video meeting](https://docs.oystehr.com/services/telemed/).\n *\n * Access Policy Requirements:\n * Action: `Telemed:CreateMeeting`\n * Access Policy Resource: `Telemed:Meeting`\n * Action: `FHIR:Create`\n * Access Policy Resource: `FHIR:Encounter`\n * Action: `FHIR:Update`\n * Access Policy Resource: `FHIR:Encounter`\n */\n createMeeting(\n params: TelemedCreateMeetingParams,\n request?: OystehrClientRequest\n ): Promise<TelemedCreateMeetingResponse> {\n return this.request('/telemed/v2/meeting', 'post')(params, request);\n }\n /**\n * Get Meeting and Attendee objects necessary to join a telemedicine video meeting.\n *\n * Access Policy Requirements:\n * Action: `Telemed:JoinMeeting`\n * Access Policy Resource: `Telemed:Meeting`\n * To use M2M token to join as anonymous user:\n * Action: `Telemed:AddAnonymousToMeeting`\n * Access Policy Resource: `Telemed:Meeting`\n */\n joinMeeting(params: TelemedJoinMeetingParams, request?: OystehrClientRequest): Promise<TelemedJoinMeetingResponse> {\n return this.request('/telemed/v2/meeting/{encounterId}/join', 'get')(params, request);\n }\n}\n"],"names":[],"mappings":";;AAAA;AAYM,MAAO,OAAQ,SAAQ,WAAW,CAAA;AACtC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;KACf;AACD;;;;;;;;;;AAUG;IACH,aAAa,CACX,MAAkC,EAClC,OAA8B,EAAA;
|
|
1
|
+
{"version":3,"file":"telemed.js","sources":["../../../../src/resources/classes/telemed.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n OystehrClientRequest,\n TelemedCreateMeetingParams,\n TelemedCreateMeetingResponse,\n TelemedJoinMeetingParams,\n TelemedJoinMeetingResponse,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class Telemed extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n baseUrlThunk(): string {\n return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';\n }\n /**\n * Create a [telemedicine video meeting](https://docs.oystehr.com/services/telemed/).\n *\n * Access Policy Requirements:\n * Action: `Telemed:CreateMeeting`\n * Access Policy Resource: `Telemed:Meeting`\n * Action: `FHIR:Create`\n * Access Policy Resource: `FHIR:Encounter`\n * Action: `FHIR:Update`\n * Access Policy Resource: `FHIR:Encounter`\n */\n createMeeting(\n params: TelemedCreateMeetingParams,\n request?: OystehrClientRequest\n ): Promise<TelemedCreateMeetingResponse> {\n return this.request('/telemed/v2/meeting', 'post', this.baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Get Meeting and Attendee objects necessary to join a telemedicine video meeting.\n *\n * Access Policy Requirements:\n * Action: `Telemed:JoinMeeting`\n * Access Policy Resource: `Telemed:Meeting`\n * To use M2M token to join as anonymous user:\n * Action: `Telemed:AddAnonymousToMeeting`\n * Access Policy Resource: `Telemed:Meeting`\n */\n joinMeeting(params: TelemedJoinMeetingParams, request?: OystehrClientRequest): Promise<TelemedJoinMeetingResponse> {\n return this.request('/telemed/v2/meeting/{encounterId}/join', 'get', this.baseUrlThunk.bind(this))(params, request);\n }\n}\n"],"names":[],"mappings":";;AAAA;AAYM,MAAO,OAAQ,SAAQ,WAAW,CAAA;AACtC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;KACf;IACD,YAAY,GAAA;;AACV,QAAA,OAAO,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAG,eAAe,CAAC,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,mCAAmC,CAAC;KACvF;AACD;;;;;;;;;;AAUG;IACH,aAAa,CACX,MAAkC,EAClC,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACnG;AACD;;;;;;;;;AASG;IACH,WAAW,CAAC,MAAgC,EAAE,OAA8B,EAAA;QAC1E,OAAO,IAAI,CAAC,OAAO,CAAC,wCAAwC,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACrH;AACF;;;;"}
|
|
@@ -3,6 +3,7 @@ import { SDKResource } from '../../client/client';
|
|
|
3
3
|
import { OystehrConfig } from '../../config';
|
|
4
4
|
export declare class TransactionalSMS extends SDKResource {
|
|
5
5
|
constructor(config: OystehrConfig);
|
|
6
|
+
baseUrlThunk(): string;
|
|
6
7
|
/**
|
|
7
8
|
* Send an SMS to any phone number. Oystehr's [Transactional SMS](https://docs.oystehr.com/services/messaging/transactional-sms/) feature makes it easy to send a text message to your [Users](https://docs.oystehr.com/services/app/users/) with a single API call. You can use this feature to send appointment reminders, prescription refill reminders, discharge information, and more.
|
|
8
9
|
*
|
|
@@ -5,6 +5,10 @@ class TransactionalSMS extends SDKResource {
|
|
|
5
5
|
constructor(config) {
|
|
6
6
|
super(config);
|
|
7
7
|
}
|
|
8
|
+
baseUrlThunk() {
|
|
9
|
+
var _a, _b;
|
|
10
|
+
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
|
|
11
|
+
}
|
|
8
12
|
/**
|
|
9
13
|
* Send an SMS to any phone number. Oystehr's [Transactional SMS](https://docs.oystehr.com/services/messaging/transactional-sms/) feature makes it easy to send a text message to your [Users](https://docs.oystehr.com/services/app/users/) with a single API call. You can use this feature to send appointment reminders, prescription refill reminders, discharge information, and more.
|
|
10
14
|
*
|
|
@@ -21,7 +25,7 @@ class TransactionalSMS extends SDKResource {
|
|
|
21
25
|
* Access Policy Resource: `FHIR:Patient`
|
|
22
26
|
*/
|
|
23
27
|
send(params, request) {
|
|
24
|
-
return this.request('/messaging/transactional-sms/send', 'post')(params, request);
|
|
28
|
+
return this.request('/messaging/transactional-sms/send', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
25
29
|
}
|
|
26
30
|
}
|
|
27
31
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactionalSMS.js","sources":["../../../../src/resources/classes/transactionalSMS.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport { OystehrClientRequest, TransactionalSMSSendParams, TransactionalSMSSendResponse } from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class TransactionalSMS extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n /**\n * Send an SMS to any phone number. Oystehr's [Transactional SMS](https://docs.oystehr.com/services/messaging/transactional-sms/) feature makes it easy to send a text message to your [Users](https://docs.oystehr.com/services/app/users/) with a single API call. You can use this feature to send appointment reminders, prescription refill reminders, discharge information, and more.\n *\n * Access Policy Requirements:\n * Action: `Messaging:SendTransactionalSMS`\n * Access Policy Resource: `Messaging:TransactionalSMS`\n * Action: `FHIR:Create`\n * Access Policy Resource: `FHIR:Communication`\n * Action: `FHIR:Update`\n * Access Policy Resource: `FHIR:Communication`\n *\n * You also need Read access for the resource to which you are sending a message. For example:\n * Action: `FHIR:Read`\n * Access Policy Resource: `FHIR:Patient`\n */\n send(params: TransactionalSMSSendParams, request?: OystehrClientRequest): Promise<TransactionalSMSSendResponse> {\n return this.request('/messaging/transactional-sms/send', 'post')(params, request);\n }\n}\n"],"names":[],"mappings":";;AAAA;AAMM,MAAO,gBAAiB,SAAQ,WAAW,CAAA;AAC/C,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;KACf;AACD;;;;;;;;;;;;;;AAcG;IACH,IAAI,CAAC,MAAkC,EAAE,OAA8B,EAAA;
|
|
1
|
+
{"version":3,"file":"transactionalSMS.js","sources":["../../../../src/resources/classes/transactionalSMS.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport { OystehrClientRequest, TransactionalSMSSendParams, TransactionalSMSSendResponse } from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class TransactionalSMS extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n baseUrlThunk(): string {\n return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';\n }\n /**\n * Send an SMS to any phone number. Oystehr's [Transactional SMS](https://docs.oystehr.com/services/messaging/transactional-sms/) feature makes it easy to send a text message to your [Users](https://docs.oystehr.com/services/app/users/) with a single API call. You can use this feature to send appointment reminders, prescription refill reminders, discharge information, and more.\n *\n * Access Policy Requirements:\n * Action: `Messaging:SendTransactionalSMS`\n * Access Policy Resource: `Messaging:TransactionalSMS`\n * Action: `FHIR:Create`\n * Access Policy Resource: `FHIR:Communication`\n * Action: `FHIR:Update`\n * Access Policy Resource: `FHIR:Communication`\n *\n * You also need Read access for the resource to which you are sending a message. For example:\n * Action: `FHIR:Read`\n * Access Policy Resource: `FHIR:Patient`\n */\n send(params: TransactionalSMSSendParams, request?: OystehrClientRequest): Promise<TransactionalSMSSendResponse> {\n return this.request('/messaging/transactional-sms/send', 'post', this.baseUrlThunk.bind(this))(params, request);\n }\n}\n"],"names":[],"mappings":";;AAAA;AAMM,MAAO,gBAAiB,SAAQ,WAAW,CAAA;AAC/C,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;KACf;IACD,YAAY,GAAA;;AACV,QAAA,OAAO,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAG,eAAe,CAAC,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,mCAAmC,CAAC;KACvF;AACD;;;;;;;;;;;;;;AAcG;IACH,IAAI,CAAC,MAAkC,EAAE,OAA8B,EAAA;QACrE,OAAO,IAAI,CAAC,OAAO,CAAC,mCAAmC,EAAE,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACjH;AACF;;;;"}
|
|
@@ -3,6 +3,7 @@ import { SDKResource } from '../../client/client';
|
|
|
3
3
|
import { OystehrConfig } from '../../config';
|
|
4
4
|
export declare class User extends SDKResource {
|
|
5
5
|
constructor(config: OystehrConfig);
|
|
6
|
+
baseUrlThunk(): string;
|
|
6
7
|
/**
|
|
7
8
|
* Get your own User details. [Users](https://docs.oystehr.com/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/services/app/applications/) you configure for securing the apps you build on top of Oystehr.
|
|
8
9
|
*
|
|
@@ -5,13 +5,17 @@ class User extends SDKResource {
|
|
|
5
5
|
constructor(config) {
|
|
6
6
|
super(config);
|
|
7
7
|
}
|
|
8
|
+
baseUrlThunk() {
|
|
9
|
+
var _a, _b;
|
|
10
|
+
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
|
|
11
|
+
}
|
|
8
12
|
/**
|
|
9
13
|
* Get your own User details. [Users](https://docs.oystehr.com/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/services/app/applications/) you configure for securing the apps you build on top of Oystehr.
|
|
10
14
|
*
|
|
11
15
|
* Fetch details about the calling User. This endpoint has no access policy requirements, it is available to all authenticated Users.
|
|
12
16
|
*/
|
|
13
17
|
me(request) {
|
|
14
|
-
return this.request('/user/me', 'get')(request);
|
|
18
|
+
return this.request('/user/me', 'get', this.baseUrlThunk.bind(this))(request);
|
|
15
19
|
}
|
|
16
20
|
/**
|
|
17
21
|
* Get the User with the provided ID. [Users](https://docs.oystehr.com/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/services/app/applications/) you configure for securing the apps you build on top of Oystehr.
|
|
@@ -20,7 +24,7 @@ class User extends SDKResource {
|
|
|
20
24
|
* Access Policy Resource: `App:User`
|
|
21
25
|
*/
|
|
22
26
|
get(params, request) {
|
|
23
|
-
return this.request('/user/{id}', 'get')(params, request);
|
|
27
|
+
return this.request('/user/{id}', 'get', this.baseUrlThunk.bind(this))(params, request);
|
|
24
28
|
}
|
|
25
29
|
/**
|
|
26
30
|
* Update the User with the provided ID. [Users](https://docs.oystehr.com/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/services/app/applications/) you configure for securing the apps you build on top of Oystehr.
|
|
@@ -29,7 +33,7 @@ class User extends SDKResource {
|
|
|
29
33
|
* Access Policy Resource: `App:User`
|
|
30
34
|
*/
|
|
31
35
|
update(params, request) {
|
|
32
|
-
return this.request('/user/{id}', 'patch')(params, request);
|
|
36
|
+
return this.request('/user/{id}', 'patch', this.baseUrlThunk.bind(this))(params, request);
|
|
33
37
|
}
|
|
34
38
|
/**
|
|
35
39
|
* Delete the User with the provided ID. [Users](https://docs.oystehr.com/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/services/app/applications/) you configure for securing the apps you build on top of Oystehr.
|
|
@@ -38,7 +42,7 @@ class User extends SDKResource {
|
|
|
38
42
|
* Access Policy Resource: `App:User`
|
|
39
43
|
*/
|
|
40
44
|
delete(params, request) {
|
|
41
|
-
return this.request('/user/{id}', 'delete')(params, request);
|
|
45
|
+
return this.request('/user/{id}', 'delete', this.baseUrlThunk.bind(this))(params, request);
|
|
42
46
|
}
|
|
43
47
|
/**
|
|
44
48
|
* Invite a User to the Project. [Users](https://docs.oystehr.com/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/services/app/applications/) you configure for securing the apps you build on top of Oystehr.
|
|
@@ -47,7 +51,7 @@ class User extends SDKResource {
|
|
|
47
51
|
* Access Policy Resource: `App:User`
|
|
48
52
|
*/
|
|
49
53
|
invite(params, request) {
|
|
50
|
-
return this.request('/user/invite', 'post')(params, request);
|
|
54
|
+
return this.request('/user/invite', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
51
55
|
}
|
|
52
56
|
/**
|
|
53
57
|
* DEPRECATED. Please use [v2/list](https://api-reference.oystehr.com/reference/get_user-v2-list) instead.
|
|
@@ -58,7 +62,7 @@ class User extends SDKResource {
|
|
|
58
62
|
* Access Policy Resource: `App:User`
|
|
59
63
|
*/
|
|
60
64
|
list(request) {
|
|
61
|
-
return this.request('/user', 'get')(request);
|
|
65
|
+
return this.request('/user', 'get', this.baseUrlThunk.bind(this))(request);
|
|
62
66
|
}
|
|
63
67
|
/**
|
|
64
68
|
* Get Users in the Project with pagination, sort, sort Order and filtering. [Users](https://docs.oystehr.com/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/services/app/applications/) you configure for securing the apps you build on top of Oystehr.
|
|
@@ -67,7 +71,7 @@ class User extends SDKResource {
|
|
|
67
71
|
* Access Policy Resource: `Project:Settings`
|
|
68
72
|
*/
|
|
69
73
|
listV2(params, request) {
|
|
70
|
-
return this.request('/user/v2/list', 'get')(params, request);
|
|
74
|
+
return this.request('/user/v2/list', 'get', this.baseUrlThunk.bind(this))(params, request);
|
|
71
75
|
}
|
|
72
76
|
}
|
|
73
77
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.js","sources":["../../../../src/resources/classes/user.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n OystehrClientRequest,\n UserDeleteParams,\n UserGetParams,\n UserGetResponse,\n UserInviteParams,\n UserInviteResponse,\n UserListResponse,\n UserListV2Params,\n UserListV2Response,\n UserMeResponse,\n UserUpdateParams,\n UserUpdateResponse,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class User extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n /**\n * Get your own User details. [Users](https://docs.oystehr.com/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Fetch details about the calling User. This endpoint has no access policy requirements, it is available to all authenticated Users.\n */\n me(request?: OystehrClientRequest): Promise<UserMeResponse> {\n return this.request('/user/me', 'get')(request);\n }\n /**\n * Get the User with the provided ID. [Users](https://docs.oystehr.com/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Access Policy Action: `App:GetUser`\n * Access Policy Resource: `App:User`\n */\n get(params: UserGetParams, request?: OystehrClientRequest): Promise<UserGetResponse> {\n return this.request('/user/{id}', 'get')(params, request);\n }\n /**\n * Update the User with the provided ID. [Users](https://docs.oystehr.com/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Access Policy Action: `App:UpdateUser`\n * Access Policy Resource: `App:User`\n */\n update(params: UserUpdateParams, request?: OystehrClientRequest): Promise<UserUpdateResponse> {\n return this.request('/user/{id}', 'patch')(params, request);\n }\n /**\n * Delete the User with the provided ID. [Users](https://docs.oystehr.com/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Access Policy Action: `App:DeleteUser`\n * Access Policy Resource: `App:User`\n */\n delete(params: UserDeleteParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/user/{id}', 'delete')(params, request);\n }\n /**\n * Invite a User to the Project. [Users](https://docs.oystehr.com/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Access Policy Action: `App:CreateUser`\n * Access Policy Resource: `App:User`\n */\n invite(params: UserInviteParams, request?: OystehrClientRequest): Promise<UserInviteResponse> {\n return this.request('/user/invite', 'post')(params, request);\n }\n /**\n * DEPRECATED. Please use [v2/list](https://api-reference.oystehr.com/reference/get_user-v2-list) instead.\n *\n * Get all Users in the Project. [Users](https://docs.oystehr.com/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Access Policy Action: `App:ListAllUsers`\n * Access Policy Resource: `App:User`\n */\n list(request?: OystehrClientRequest): Promise<UserListResponse> {\n return this.request('/user', 'get')(request);\n }\n /**\n * Get Users in the Project with pagination, sort, sort Order and filtering. [Users](https://docs.oystehr.com/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Access Policy Action: `Project:ListAllUsers`\n * Access Policy Resource: `Project:Settings`\n */\n listV2(params: UserListV2Params, request?: OystehrClientRequest): Promise<UserListV2Response> {\n return this.request('/user/v2/list', 'get')(params, request);\n }\n}\n"],"names":[],"mappings":";;AAAA;AAmBM,MAAO,IAAK,SAAQ,WAAW,CAAA;AACnC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;KACf;AACD;;;;AAIG;AACH,IAAA,EAAE,CAAC,OAA8B,EAAA;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"user.js","sources":["../../../../src/resources/classes/user.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n OystehrClientRequest,\n UserDeleteParams,\n UserGetParams,\n UserGetResponse,\n UserInviteParams,\n UserInviteResponse,\n UserListResponse,\n UserListV2Params,\n UserListV2Response,\n UserMeResponse,\n UserUpdateParams,\n UserUpdateResponse,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class User extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n baseUrlThunk(): string {\n return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';\n }\n /**\n * Get your own User details. [Users](https://docs.oystehr.com/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Fetch details about the calling User. This endpoint has no access policy requirements, it is available to all authenticated Users.\n */\n me(request?: OystehrClientRequest): Promise<UserMeResponse> {\n return this.request('/user/me', 'get', this.baseUrlThunk.bind(this))(request);\n }\n /**\n * Get the User with the provided ID. [Users](https://docs.oystehr.com/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Access Policy Action: `App:GetUser`\n * Access Policy Resource: `App:User`\n */\n get(params: UserGetParams, request?: OystehrClientRequest): Promise<UserGetResponse> {\n return this.request('/user/{id}', 'get', this.baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Update the User with the provided ID. [Users](https://docs.oystehr.com/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Access Policy Action: `App:UpdateUser`\n * Access Policy Resource: `App:User`\n */\n update(params: UserUpdateParams, request?: OystehrClientRequest): Promise<UserUpdateResponse> {\n return this.request('/user/{id}', 'patch', this.baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Delete the User with the provided ID. [Users](https://docs.oystehr.com/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Access Policy Action: `App:DeleteUser`\n * Access Policy Resource: `App:User`\n */\n delete(params: UserDeleteParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/user/{id}', 'delete', this.baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Invite a User to the Project. [Users](https://docs.oystehr.com/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Access Policy Action: `App:CreateUser`\n * Access Policy Resource: `App:User`\n */\n invite(params: UserInviteParams, request?: OystehrClientRequest): Promise<UserInviteResponse> {\n return this.request('/user/invite', 'post', this.baseUrlThunk.bind(this))(params, request);\n }\n /**\n * DEPRECATED. Please use [v2/list](https://api-reference.oystehr.com/reference/get_user-v2-list) instead.\n *\n * Get all Users in the Project. [Users](https://docs.oystehr.com/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Access Policy Action: `App:ListAllUsers`\n * Access Policy Resource: `App:User`\n */\n list(request?: OystehrClientRequest): Promise<UserListResponse> {\n return this.request('/user', 'get', this.baseUrlThunk.bind(this))(request);\n }\n /**\n * Get Users in the Project with pagination, sort, sort Order and filtering. [Users](https://docs.oystehr.com/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Access Policy Action: `Project:ListAllUsers`\n * Access Policy Resource: `Project:Settings`\n */\n listV2(params: UserListV2Params, request?: OystehrClientRequest): Promise<UserListV2Response> {\n return this.request('/user/v2/list', 'get', this.baseUrlThunk.bind(this))(params, request);\n }\n}\n"],"names":[],"mappings":";;AAAA;AAmBM,MAAO,IAAK,SAAQ,WAAW,CAAA;AACnC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;KACf;IACD,YAAY,GAAA;;AACV,QAAA,OAAO,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAG,eAAe,CAAC,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,mCAAmC,CAAC;KACvF;AACD;;;;AAIG;AACH,IAAA,EAAE,CAAC,OAA8B,EAAA;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;KAC/E;AACD;;;;;AAKG;IACH,GAAG,CAAC,MAAqB,EAAE,OAA8B,EAAA;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACzF;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAAwB,EAAE,OAA8B,EAAA;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC3F;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAAwB,EAAE,OAA8B,EAAA;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,QAAQ,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC5F;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAAwB,EAAE,OAA8B,EAAA;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC5F;AACD;;;;;;;AAOG;AACH,IAAA,IAAI,CAAC,OAA8B,EAAA;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;KAC5E;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAAwB,EAAE,OAA8B,EAAA;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC5F;AACF;;;;"}
|
|
@@ -3,6 +3,7 @@ import { SDKResource } from '../../client/client';
|
|
|
3
3
|
import { OystehrConfig } from '../../config';
|
|
4
4
|
export declare class Version extends SDKResource {
|
|
5
5
|
constructor(config: OystehrConfig);
|
|
6
|
+
baseUrlThunk(): string;
|
|
6
7
|
/**
|
|
7
8
|
* Get project API version. This endpoint is public so there are no access policy requirements.
|
|
8
9
|
*/
|
|
@@ -5,11 +5,15 @@ class Version extends SDKResource {
|
|
|
5
5
|
constructor(config) {
|
|
6
6
|
super(config);
|
|
7
7
|
}
|
|
8
|
+
baseUrlThunk() {
|
|
9
|
+
var _a, _b;
|
|
10
|
+
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
|
|
11
|
+
}
|
|
8
12
|
/**
|
|
9
13
|
* Get project API version. This endpoint is public so there are no access policy requirements.
|
|
10
14
|
*/
|
|
11
15
|
get(request) {
|
|
12
|
-
return this.request('/version', 'get')(request);
|
|
16
|
+
return this.request('/version', 'get', this.baseUrlThunk.bind(this))(request);
|
|
13
17
|
}
|
|
14
18
|
}
|
|
15
19
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sources":["../../../../src/resources/classes/version.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport { OystehrClientRequest, VersionGetResponse } from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class Version extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n /**\n * Get project API version. This endpoint is public so there are no access policy requirements.\n */\n get(request?: OystehrClientRequest): Promise<VersionGetResponse> {\n return this.request('/version', 'get')(request);\n }\n}\n"],"names":[],"mappings":";;AAAA;AAMM,MAAO,OAAQ,SAAQ,WAAW,CAAA;AACtC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;KACf;AACD;;AAEG;AACH,IAAA,GAAG,CAAC,OAA8B,EAAA;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"version.js","sources":["../../../../src/resources/classes/version.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport { OystehrClientRequest, VersionGetResponse } from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class Version extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n baseUrlThunk(): string {\n return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';\n }\n /**\n * Get project API version. This endpoint is public so there are no access policy requirements.\n */\n get(request?: OystehrClientRequest): Promise<VersionGetResponse> {\n return this.request('/version', 'get', this.baseUrlThunk.bind(this))(request);\n }\n}\n"],"names":[],"mappings":";;AAAA;AAMM,MAAO,OAAQ,SAAQ,WAAW,CAAA;AACtC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;KACf;IACD,YAAY,GAAA;;AACV,QAAA,OAAO,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAG,eAAe,CAAC,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,mCAAmC,CAAC;KACvF;AACD;;AAEG;AACH,IAAA,GAAG,CAAC,OAA8B,EAAA;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;KAC/E;AACF;;;;"}
|
|
@@ -2,6 +2,10 @@ import { __awaiter } from '../../node_modules/tslib/tslib.es6.js';
|
|
|
2
2
|
import { defaultProjectApiUrl } from '../../client/client.js';
|
|
3
3
|
import { OystehrSdkError } from '../../errors/index.js';
|
|
4
4
|
|
|
5
|
+
function baseUrlThunk() {
|
|
6
|
+
var _a, _b;
|
|
7
|
+
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
|
|
8
|
+
}
|
|
5
9
|
/**
|
|
6
10
|
* Uploads a file to the bucket and key. Files should be Blobs.
|
|
7
11
|
*
|
|
@@ -9,7 +13,7 @@ import { OystehrSdkError } from '../../errors/index.js';
|
|
|
9
13
|
*/
|
|
10
14
|
function uploadFile({ bucketName, 'objectPath+': key, file, }) {
|
|
11
15
|
return __awaiter(this, void 0, void 0, function* () {
|
|
12
|
-
const uploadUrl = yield this.request('/z3/{bucketName}/{objectPath+}', 'post')({
|
|
16
|
+
const uploadUrl = yield this.request('/z3/{bucketName}/{objectPath+}', 'post', baseUrlThunk.bind(this))({
|
|
13
17
|
action: 'upload',
|
|
14
18
|
bucketName,
|
|
15
19
|
'objectPath+': key,
|
|
@@ -27,7 +31,7 @@ function uploadFile({ bucketName, 'objectPath+': key, file, }) {
|
|
|
27
31
|
*/
|
|
28
32
|
function downloadFile({ bucketName, 'objectPath+': key, }) {
|
|
29
33
|
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
-
const uploadUrl = yield this.request('/z3/{bucketName}/{objectPath+}', 'post')({
|
|
34
|
+
const uploadUrl = yield this.request('/z3/{bucketName}/{objectPath+}', 'post', baseUrlThunk.bind(this))({
|
|
31
35
|
action: 'download',
|
|
32
36
|
bucketName,
|
|
33
37
|
'objectPath+': key,
|
|
@@ -49,7 +53,7 @@ function downloadFile({ bucketName, 'objectPath+': key, }) {
|
|
|
49
53
|
* @param params url and action
|
|
50
54
|
*/
|
|
51
55
|
function getPresignedUrlForZ3Url(params) {
|
|
52
|
-
var _a;
|
|
56
|
+
var _a, _b;
|
|
53
57
|
return __awaiter(this, void 0, void 0, function* () {
|
|
54
58
|
let bucket;
|
|
55
59
|
let key;
|
|
@@ -60,7 +64,7 @@ function getPresignedUrlForZ3Url(params) {
|
|
|
60
64
|
bucket = url.hostname;
|
|
61
65
|
key = z3PathParts.join('/');
|
|
62
66
|
}
|
|
63
|
-
else if (url.href.startsWith((_a = this.config.projectApiUrl) !== null &&
|
|
67
|
+
else if (url.href.startsWith((_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : defaultProjectApiUrl)) {
|
|
64
68
|
// remove leading `/v1/z3`
|
|
65
69
|
const httpsPathParts = url.pathname.split('/').slice(3);
|
|
66
70
|
bucket = httpsPathParts[0];
|
|
@@ -74,7 +78,7 @@ function getPresignedUrlForZ3Url(params) {
|
|
|
74
78
|
bucketName: bucket,
|
|
75
79
|
'objectPath+': key,
|
|
76
80
|
};
|
|
77
|
-
return this.request('/z3/{bucketName}/{objectPath+}', 'post')(requestParams);
|
|
81
|
+
return this.request('/z3/{bucketName}/{objectPath+}', 'post', baseUrlThunk.bind(this))(requestParams);
|
|
78
82
|
});
|
|
79
83
|
}
|
|
80
84
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"z3-ext.js","sources":["../../../../src/resources/classes/z3-ext.ts"],"sourcesContent":["import { defaultProjectApiUrl, SDKResource } from '../../client/client';\nimport { OystehrSdkError } from '../../errors';\nimport { Z3GetPresignedUrlParams, Z3GetPresignedUrlResponse } from '../types';\n\n/**\n * Uploads a file to the bucket and key. Files should be Blobs.\n *\n * @param params upload file params\n */\nexport async function uploadFile(\n this: SDKResource,\n {\n bucketName,\n 'objectPath+': key,\n file,\n }: {\n bucketName: string;\n 'objectPath+': string;\n file: Blob;\n }\n): Promise<void> {\n const uploadUrl = await this.request(\n '/z3/{bucketName}/{objectPath+}',\n 'post'\n )({\n action: 'upload',\n bucketName,\n 'objectPath+': key,\n });\n await fetch(uploadUrl.signedUrl, {\n method: 'PUT',\n body: file,\n });\n}\n\n/**\n * Downloads an object matching the bucket and key. File content is returned as an ArrayBuffer.\n *\n * @param params download file params\n */\nexport async function downloadFile(\n this: SDKResource,\n {\n bucketName,\n 'objectPath+': key,\n }: {\n bucketName: string;\n 'objectPath+': string;\n }\n): Promise<ArrayBuffer> {\n const uploadUrl = await this.request(\n '/z3/{bucketName}/{objectPath+}',\n 'post'\n )({\n action: 'download',\n bucketName,\n 'objectPath+': key,\n });\n const resp = await fetch(uploadUrl.signedUrl, {\n method: 'GET',\n });\n if (!resp.ok) {\n throw new Error('Failed to download file');\n }\n return resp.arrayBuffer();\n}\n\n/**\n * This helper performs a `getPresignedUrl` request for Z3 URLs of the forms\n * `https://projects-api.oystehr.com/v1/z3/<bucket>/<key>` or `z3://<bucket>/<key>`\n * instead of the standard SDK `Z3GetPresignedUrlParams`.\n *\n * @param params url and action\n */\nexport async function getPresignedUrlForZ3Url(\n this: SDKResource,\n params: { url: string; action: Z3GetPresignedUrlParams['action'] }\n): Promise<Z3GetPresignedUrlResponse> {\n let bucket: string;\n let key: string;\n const url = new URL(params.url);\n if (url.protocol === 'z3:') {\n // remove leading forward slash\n const z3PathParts = url.pathname.split('/').slice(1);\n bucket = url.hostname;\n key = z3PathParts.join('/');\n } else if (url.href.startsWith(this.config.projectApiUrl ?? defaultProjectApiUrl)) {\n // remove leading `/v1/z3`\n const httpsPathParts = url.pathname.split('/').slice(3);\n bucket = httpsPathParts[0];\n key = httpsPathParts.slice(1).join('/');\n } else {\n throw new OystehrSdkError({ message: 'Invalid Z3 URL', code: 400 });\n }\n const requestParams: Z3GetPresignedUrlParams = {\n action: 'upload',\n bucketName: bucket,\n 'objectPath+': key,\n };\n return this.request('/z3/{bucketName}/{objectPath+}', 'post')(requestParams);\n}\n"],"names":[],"mappings":";;;;AAIA;;;;AAIG;AACG,SAAgB,UAAU,CAE9B,EACE,UAAU,EACV,aAAa,EAAE,GAAG,EAClB,IAAI,GAKL,EAAA;;
|
|
1
|
+
{"version":3,"file":"z3-ext.js","sources":["../../../../src/resources/classes/z3-ext.ts"],"sourcesContent":["import { defaultProjectApiUrl, SDKResource } from '../../client/client';\nimport { OystehrSdkError } from '../../errors';\nimport { Z3GetPresignedUrlParams, Z3GetPresignedUrlResponse } from '../types';\n\nfunction baseUrlThunk(this: SDKResource): string {\n return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';\n}\n\n/**\n * Uploads a file to the bucket and key. Files should be Blobs.\n *\n * @param params upload file params\n */\nexport async function uploadFile(\n this: SDKResource,\n {\n bucketName,\n 'objectPath+': key,\n file,\n }: {\n bucketName: string;\n 'objectPath+': string;\n file: Blob;\n }\n): Promise<void> {\n const uploadUrl = await this.request(\n '/z3/{bucketName}/{objectPath+}',\n 'post',\n baseUrlThunk.bind(this)\n )({\n action: 'upload',\n bucketName,\n 'objectPath+': key,\n });\n await fetch(uploadUrl.signedUrl, {\n method: 'PUT',\n body: file,\n });\n}\n\n/**\n * Downloads an object matching the bucket and key. File content is returned as an ArrayBuffer.\n *\n * @param params download file params\n */\nexport async function downloadFile(\n this: SDKResource,\n {\n bucketName,\n 'objectPath+': key,\n }: {\n bucketName: string;\n 'objectPath+': string;\n }\n): Promise<ArrayBuffer> {\n const uploadUrl = await this.request(\n '/z3/{bucketName}/{objectPath+}',\n 'post',\n baseUrlThunk.bind(this)\n )({\n action: 'download',\n bucketName,\n 'objectPath+': key,\n });\n const resp = await fetch(uploadUrl.signedUrl, {\n method: 'GET',\n });\n if (!resp.ok) {\n throw new Error('Failed to download file');\n }\n return resp.arrayBuffer();\n}\n\n/**\n * This helper performs a `getPresignedUrl` request for Z3 URLs of the forms\n * `https://projects-api.oystehr.com/v1/z3/<bucket>/<key>` or `z3://<bucket>/<key>`\n * instead of the standard SDK `Z3GetPresignedUrlParams`.\n *\n * @param params url and action\n */\nexport async function getPresignedUrlForZ3Url(\n this: SDKResource,\n params: { url: string; action: Z3GetPresignedUrlParams['action'] }\n): Promise<Z3GetPresignedUrlResponse> {\n let bucket: string;\n let key: string;\n const url = new URL(params.url);\n if (url.protocol === 'z3:') {\n // remove leading forward slash\n const z3PathParts = url.pathname.split('/').slice(1);\n bucket = url.hostname;\n key = z3PathParts.join('/');\n } else if (url.href.startsWith(this.config.services?.['projectApiUrl'] ?? defaultProjectApiUrl)) {\n // remove leading `/v1/z3`\n const httpsPathParts = url.pathname.split('/').slice(3);\n bucket = httpsPathParts[0];\n key = httpsPathParts.slice(1).join('/');\n } else {\n throw new OystehrSdkError({ message: 'Invalid Z3 URL', code: 400 });\n }\n const requestParams: Z3GetPresignedUrlParams = {\n action: 'upload',\n bucketName: bucket,\n 'objectPath+': key,\n };\n return this.request('/z3/{bucketName}/{objectPath+}', 'post', baseUrlThunk.bind(this))(requestParams);\n}\n"],"names":[],"mappings":";;;;AAIA,SAAS,YAAY,GAAA;;AACnB,IAAA,OAAO,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAG,eAAe,CAAC,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,mCAAmC,CAAC;AACxF,CAAC;AAED;;;;AAIG;AACG,SAAgB,UAAU,CAE9B,EACE,UAAU,EACV,aAAa,EAAE,GAAG,EAClB,IAAI,GAKL,EAAA;;AAED,QAAA,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,OAAO,CAClC,gCAAgC,EAChC,MAAM,EACN,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CACxB,CAAC;AACA,YAAA,MAAM,EAAE,QAAQ;YAChB,UAAU;AACV,YAAA,aAAa,EAAE,GAAG;AACnB,SAAA,CAAC,CAAC;AACH,QAAA,MAAM,KAAK,CAAC,SAAS,CAAC,SAAS,EAAE;AAC/B,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,IAAI,EAAE,IAAI;AACX,SAAA,CAAC,CAAC;KACJ,CAAA,CAAA;AAAA,CAAA;AAED;;;;AAIG;AACG,SAAgB,YAAY,CAEhC,EACE,UAAU,EACV,aAAa,EAAE,GAAG,GAInB,EAAA;;AAED,QAAA,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,OAAO,CAClC,gCAAgC,EAChC,MAAM,EACN,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CACxB,CAAC;AACA,YAAA,MAAM,EAAE,UAAU;YAClB,UAAU;AACV,YAAA,aAAa,EAAE,GAAG;AACnB,SAAA,CAAC,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC,SAAS,CAAC,SAAS,EAAE;AAC5C,YAAA,MAAM,EAAE,KAAK;AACd,SAAA,CAAC,CAAC;AACH,QAAA,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;AACZ,YAAA,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AAC5C,SAAA;AACD,QAAA,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC;KAC3B,CAAA,CAAA;AAAA,CAAA;AAED;;;;;;AAMG;AACG,SAAgB,uBAAuB,CAE3C,MAAkE,EAAA;;;AAElE,QAAA,IAAI,MAAc,CAAC;AACnB,QAAA,IAAI,GAAW,CAAC;QAChB,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAChC,QAAA,IAAI,GAAG,CAAC,QAAQ,KAAK,KAAK,EAAE;;AAE1B,YAAA,MAAM,WAAW,GAAG,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACrD,YAAA,MAAM,GAAG,GAAG,CAAC,QAAQ,CAAC;AACtB,YAAA,GAAG,GAAG,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7B,SAAA;AAAM,aAAA,IAAI,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,MAAA,CAAA,EAAA,GAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,MAAG,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,eAAe,CAAC,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,oBAAoB,CAAC,EAAE;;AAE/F,YAAA,MAAM,cAAc,GAAG,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACxD,YAAA,MAAM,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;AAC3B,YAAA,GAAG,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzC,SAAA;AAAM,aAAA;AACL,YAAA,MAAM,IAAI,eAAe,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;AACrE,SAAA;AACD,QAAA,MAAM,aAAa,GAA4B;AAC7C,YAAA,MAAM,EAAE,QAAQ;AAChB,YAAA,UAAU,EAAE,MAAM;AAClB,YAAA,aAAa,EAAE,GAAG;SACnB,CAAC;AACF,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,gCAAgC,EAAE,MAAM,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC;;AACvG;;;;"}
|
|
@@ -4,6 +4,7 @@ import { OystehrConfig } from '../../config';
|
|
|
4
4
|
import * as ext from './z3-ext';
|
|
5
5
|
export declare class Z3 extends SDKResource {
|
|
6
6
|
constructor(config: OystehrConfig);
|
|
7
|
+
baseUrlThunk(): string;
|
|
7
8
|
/**
|
|
8
9
|
* Uploads a file to the bucket and key. Files should be Blobs.
|
|
9
10
|
* @param params upload file params
|
|
@@ -23,6 +23,10 @@ class Z3 extends SDKResource {
|
|
|
23
23
|
*/
|
|
24
24
|
this.getPresignedUrlForZ3Url = getPresignedUrlForZ3Url;
|
|
25
25
|
}
|
|
26
|
+
baseUrlThunk() {
|
|
27
|
+
var _a, _b;
|
|
28
|
+
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
|
|
29
|
+
}
|
|
26
30
|
/**
|
|
27
31
|
* List all Z3 Buckets. [Z3](https://docs.oystehr.com/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.
|
|
28
32
|
*
|
|
@@ -30,7 +34,7 @@ class Z3 extends SDKResource {
|
|
|
30
34
|
* Access Policy Resource: `Z3:BucketName`
|
|
31
35
|
*/
|
|
32
36
|
listBuckets(request) {
|
|
33
|
-
return this.request('/z3', 'get')(request);
|
|
37
|
+
return this.request('/z3', 'get', this.baseUrlThunk.bind(this))(request);
|
|
34
38
|
}
|
|
35
39
|
/**
|
|
36
40
|
* Create a Z3 Bucket with the provided name. [Z3](https://docs.oystehr.com/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.
|
|
@@ -39,7 +43,7 @@ class Z3 extends SDKResource {
|
|
|
39
43
|
* Access Policy Resource: `Z3:BucketName`
|
|
40
44
|
*/
|
|
41
45
|
createBucket(params, request) {
|
|
42
|
-
return this.request('/z3/{bucketName}', 'put')(params, request);
|
|
46
|
+
return this.request('/z3/{bucketName}', 'put', this.baseUrlThunk.bind(this))(params, request);
|
|
43
47
|
}
|
|
44
48
|
/**
|
|
45
49
|
* Delete the Z3 Bucket with the provided name. [Z3](https://docs.oystehr.com/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.
|
|
@@ -48,7 +52,7 @@ class Z3 extends SDKResource {
|
|
|
48
52
|
* Access Policy Resource: `Z3:BucketName`
|
|
49
53
|
*/
|
|
50
54
|
deleteBucket(params, request) {
|
|
51
|
-
return this.request('/z3/{bucketName}', 'delete')(params, request);
|
|
55
|
+
return this.request('/z3/{bucketName}', 'delete', this.baseUrlThunk.bind(this))(params, request);
|
|
52
56
|
}
|
|
53
57
|
/**
|
|
54
58
|
* List all Z3 Objects at the provided path in the Bucket with the provided name [Z3](https://docs.oystehr.com/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.
|
|
@@ -57,7 +61,7 @@ class Z3 extends SDKResource {
|
|
|
57
61
|
* Access Policy Resource: `Z3:BucketName:ObjectPath`
|
|
58
62
|
*/
|
|
59
63
|
listObjects(params, request) {
|
|
60
|
-
return this.request('/z3/{bucketName}/{objectPath+}', 'get')(params, request);
|
|
64
|
+
return this.request('/z3/{bucketName}/{objectPath+}', 'get', this.baseUrlThunk.bind(this))(params, request);
|
|
61
65
|
}
|
|
62
66
|
/**
|
|
63
67
|
* Get a link for downloading or uploading a Z3 Object to the provided path in the Bucket with the provided name. [Z3](https://docs.oystehr.com/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.
|
|
@@ -66,7 +70,7 @@ class Z3 extends SDKResource {
|
|
|
66
70
|
* Access Policy Resource: `Z3:BucketName:ObjectPath`
|
|
67
71
|
*/
|
|
68
72
|
getPresignedUrl(params, request) {
|
|
69
|
-
return this.request('/z3/{bucketName}/{objectPath+}', 'post')(params, request);
|
|
73
|
+
return this.request('/z3/{bucketName}/{objectPath+}', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
70
74
|
}
|
|
71
75
|
/**
|
|
72
76
|
* Delete the Z3 Object at the provided path in the Bucket with the provided name. [Z3](https://docs.oystehr.com/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.
|
|
@@ -75,7 +79,7 @@ class Z3 extends SDKResource {
|
|
|
75
79
|
* Access Policy Resource: `Z3:BucketName:ObjectPath`
|
|
76
80
|
*/
|
|
77
81
|
deleteObject(params, request) {
|
|
78
|
-
return this.request('/z3/{bucketName}/{objectPath+}', 'delete')(params, request);
|
|
82
|
+
return this.request('/z3/{bucketName}/{objectPath+}', 'delete', this.baseUrlThunk.bind(this))(params, request);
|
|
79
83
|
}
|
|
80
84
|
}
|
|
81
85
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"z3.js","sources":["../../../../src/resources/classes/z3.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n OystehrClientRequest,\n Z3CreateBucketParams,\n Z3CreateBucketResponse,\n Z3DeleteBucketParams,\n Z3DeleteObjectParams,\n Z3GetPresignedUrlParams,\n Z3GetPresignedUrlResponse,\n Z3ListBucketsResponse,\n Z3ListObjectsParams,\n Z3ListObjectsResponse,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\nimport * as ext from './z3-ext';\n\nexport class Z3 extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n /**\n * Uploads a file to the bucket and key. Files should be Blobs.\n * @param params upload file params\n */\n uploadFile = ext.uploadFile;\n /**\n * Downloads an object matching the bucket and key. File content is returned as an ArrayBuffer.\n * @param params download file params\n */\n downloadFile = ext.downloadFile;\n /**\n * This helper performs a `getPresignedUrl` request for Z3 URLs of the forms\n * `https://projects-api.oystehr.com/v1/z3/<bucket>/<key>` or `z3://<bucket>/<key>`\n * instead of the standard SDK `Z3GetPresignedUrlParams`.\n * @param params url and action\n */\n getPresignedUrlForZ3Url = ext.getPresignedUrlForZ3Url;\n /**\n * List all Z3 Buckets. [Z3](https://docs.oystehr.com/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.\n *\n * Access Policy Action: `Z3:ListBuckets`\n * Access Policy Resource: `Z3:BucketName`\n */\n listBuckets(request?: OystehrClientRequest): Promise<Z3ListBucketsResponse> {\n return this.request('/z3', 'get')(request);\n }\n /**\n * Create a Z3 Bucket with the provided name. [Z3](https://docs.oystehr.com/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.\n *\n * Access Policy Action: `Z3:CreateBucket`\n * Access Policy Resource: `Z3:BucketName`\n */\n createBucket(params: Z3CreateBucketParams, request?: OystehrClientRequest): Promise<Z3CreateBucketResponse> {\n return this.request('/z3/{bucketName}', 'put')(params, request);\n }\n /**\n * Delete the Z3 Bucket with the provided name. [Z3](https://docs.oystehr.com/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.\n *\n * Access Policy Action: `Z3:DeleteBucket`\n * Access Policy Resource: `Z3:BucketName`\n */\n deleteBucket(params: Z3DeleteBucketParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/z3/{bucketName}', 'delete')(params, request);\n }\n /**\n * List all Z3 Objects at the provided path in the Bucket with the provided name [Z3](https://docs.oystehr.com/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.\n *\n * Access Policy Action: `Z3:ListObjects`\n * Access Policy Resource: `Z3:BucketName:ObjectPath`\n */\n listObjects(params: Z3ListObjectsParams, request?: OystehrClientRequest): Promise<Z3ListObjectsResponse> {\n return this.request('/z3/{bucketName}/{objectPath+}', 'get')(params, request);\n }\n /**\n * Get a link for downloading or uploading a Z3 Object to the provided path in the Bucket with the provided name. [Z3](https://docs.oystehr.com/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.\n *\n * Access Policy Action: `Z3:PutObject` or `Z3:GetObject`\n * Access Policy Resource: `Z3:BucketName:ObjectPath`\n */\n getPresignedUrl(params: Z3GetPresignedUrlParams, request?: OystehrClientRequest): Promise<Z3GetPresignedUrlResponse> {\n return this.request('/z3/{bucketName}/{objectPath+}', 'post')(params, request);\n }\n /**\n * Delete the Z3 Object at the provided path in the Bucket with the provided name. [Z3](https://docs.oystehr.com/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.\n *\n * Access Policy Action: `Z3:DeleteObject`\n * Access Policy Resource: `Z3:BucketName:ObjectPath`\n */\n deleteObject(params: Z3DeleteObjectParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/z3/{bucketName}/{objectPath+}', 'delete')(params, request);\n }\n}\n"],"names":["ext.uploadFile","ext.downloadFile","ext.getPresignedUrlForZ3Url"],"mappings":";;;AAAA;AAkBM,MAAO,EAAG,SAAQ,WAAW,CAAA;AACjC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"z3.js","sources":["../../../../src/resources/classes/z3.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n OystehrClientRequest,\n Z3CreateBucketParams,\n Z3CreateBucketResponse,\n Z3DeleteBucketParams,\n Z3DeleteObjectParams,\n Z3GetPresignedUrlParams,\n Z3GetPresignedUrlResponse,\n Z3ListBucketsResponse,\n Z3ListObjectsParams,\n Z3ListObjectsResponse,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\nimport * as ext from './z3-ext';\n\nexport class Z3 extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n baseUrlThunk(): string {\n return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';\n }\n /**\n * Uploads a file to the bucket and key. Files should be Blobs.\n * @param params upload file params\n */\n uploadFile = ext.uploadFile;\n /**\n * Downloads an object matching the bucket and key. File content is returned as an ArrayBuffer.\n * @param params download file params\n */\n downloadFile = ext.downloadFile;\n /**\n * This helper performs a `getPresignedUrl` request for Z3 URLs of the forms\n * `https://projects-api.oystehr.com/v1/z3/<bucket>/<key>` or `z3://<bucket>/<key>`\n * instead of the standard SDK `Z3GetPresignedUrlParams`.\n * @param params url and action\n */\n getPresignedUrlForZ3Url = ext.getPresignedUrlForZ3Url;\n /**\n * List all Z3 Buckets. [Z3](https://docs.oystehr.com/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.\n *\n * Access Policy Action: `Z3:ListBuckets`\n * Access Policy Resource: `Z3:BucketName`\n */\n listBuckets(request?: OystehrClientRequest): Promise<Z3ListBucketsResponse> {\n return this.request('/z3', 'get', this.baseUrlThunk.bind(this))(request);\n }\n /**\n * Create a Z3 Bucket with the provided name. [Z3](https://docs.oystehr.com/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.\n *\n * Access Policy Action: `Z3:CreateBucket`\n * Access Policy Resource: `Z3:BucketName`\n */\n createBucket(params: Z3CreateBucketParams, request?: OystehrClientRequest): Promise<Z3CreateBucketResponse> {\n return this.request('/z3/{bucketName}', 'put', this.baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Delete the Z3 Bucket with the provided name. [Z3](https://docs.oystehr.com/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.\n *\n * Access Policy Action: `Z3:DeleteBucket`\n * Access Policy Resource: `Z3:BucketName`\n */\n deleteBucket(params: Z3DeleteBucketParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/z3/{bucketName}', 'delete', this.baseUrlThunk.bind(this))(params, request);\n }\n /**\n * List all Z3 Objects at the provided path in the Bucket with the provided name [Z3](https://docs.oystehr.com/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.\n *\n * Access Policy Action: `Z3:ListObjects`\n * Access Policy Resource: `Z3:BucketName:ObjectPath`\n */\n listObjects(params: Z3ListObjectsParams, request?: OystehrClientRequest): Promise<Z3ListObjectsResponse> {\n return this.request('/z3/{bucketName}/{objectPath+}', 'get', this.baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Get a link for downloading or uploading a Z3 Object to the provided path in the Bucket with the provided name. [Z3](https://docs.oystehr.com/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.\n *\n * Access Policy Action: `Z3:PutObject` or `Z3:GetObject`\n * Access Policy Resource: `Z3:BucketName:ObjectPath`\n */\n getPresignedUrl(params: Z3GetPresignedUrlParams, request?: OystehrClientRequest): Promise<Z3GetPresignedUrlResponse> {\n return this.request('/z3/{bucketName}/{objectPath+}', 'post', this.baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Delete the Z3 Object at the provided path in the Bucket with the provided name. [Z3](https://docs.oystehr.com/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.\n *\n * Access Policy Action: `Z3:DeleteObject`\n * Access Policy Resource: `Z3:BucketName:ObjectPath`\n */\n deleteObject(params: Z3DeleteObjectParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/z3/{bucketName}/{objectPath+}', 'delete', this.baseUrlThunk.bind(this))(params, request);\n }\n}\n"],"names":["ext.uploadFile","ext.downloadFile","ext.getPresignedUrlForZ3Url"],"mappings":";;;AAAA;AAkBM,MAAO,EAAG,SAAQ,WAAW,CAAA;AACjC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;AAKhB;;;AAGG;AACH,QAAA,IAAA,CAAA,UAAU,GAAGA,UAAc,CAAC;AAC5B;;;AAGG;AACH,QAAA,IAAA,CAAA,YAAY,GAAGC,YAAgB,CAAC;AAChC;;;;;AAKG;AACH,QAAA,IAAA,CAAA,uBAAuB,GAAGC,uBAA2B,CAAC;KApBrD;IACD,YAAY,GAAA;;AACV,QAAA,OAAO,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAG,eAAe,CAAC,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,mCAAmC,CAAC;KACvF;AAkBD;;;;;AAKG;AACH,IAAA,WAAW,CAAC,OAA8B,EAAA;QACxC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;KAC1E;AACD;;;;;AAKG;IACH,YAAY,CAAC,MAA4B,EAAE,OAA8B,EAAA;QACvE,OAAO,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC/F;AACD;;;;;AAKG;IACH,YAAY,CAAC,MAA4B,EAAE,OAA8B,EAAA;QACvE,OAAO,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE,QAAQ,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAClG;AACD;;;;;AAKG;IACH,WAAW,CAAC,MAA2B,EAAE,OAA8B,EAAA;QACrE,OAAO,IAAI,CAAC,OAAO,CAAC,gCAAgC,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC7G;AACD;;;;;AAKG;IACH,eAAe,CAAC,MAA+B,EAAE,OAA8B,EAAA;QAC7E,OAAO,IAAI,CAAC,OAAO,CAAC,gCAAgC,EAAE,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC9G;AACD;;;;;AAKG;IACH,YAAY,CAAC,MAA4B,EAAE,OAA8B,EAAA;QACvE,OAAO,IAAI,CAAC,OAAO,CAAC,gCAAgC,EAAE,QAAQ,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAChH;AACF;;;;"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { __awaiter } from '../../node_modules/tslib/tslib.es6.js';
|
|
2
2
|
|
|
3
|
+
function baseUrlThunk() {
|
|
4
|
+
var _a, _b;
|
|
5
|
+
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
|
|
6
|
+
}
|
|
3
7
|
function uploadFile({ id, file, filename, }) {
|
|
4
8
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5
|
-
const uploadUrl = yield this.request('/zambda/{id}/s3-upload', 'post')({ id, filename });
|
|
9
|
+
const uploadUrl = yield this.request('/zambda/{id}/s3-upload', 'post', baseUrlThunk.bind(this))({ id, filename });
|
|
6
10
|
yield fetch(uploadUrl.signedUrl, {
|
|
7
11
|
method: 'PUT',
|
|
8
12
|
body: file,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zambda-ext.js","sources":["../../../../src/resources/classes/zambda-ext.ts"],"sourcesContent":["import { SDKResource } from '../../client/client';\n\nexport async function uploadFile(\n this: SDKResource,\n {\n id,\n file,\n filename,\n }: {\n id: string;\n file: Blob;\n filename?: string | undefined;\n }\n): Promise<void> {\n const uploadUrl = await this.request('/zambda/{id}/s3-upload', 'post')({ id, filename });\n await fetch(uploadUrl.signedUrl, {\n method: 'PUT',\n body: file,\n });\n}\n"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"zambda-ext.js","sources":["../../../../src/resources/classes/zambda-ext.ts"],"sourcesContent":["import { SDKResource } from '../../client/client';\n\nfunction baseUrlThunk(this: SDKResource): string {\n return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';\n}\n\nexport async function uploadFile(\n this: SDKResource,\n {\n id,\n file,\n filename,\n }: {\n id: string;\n file: Blob;\n filename?: string | undefined;\n }\n): Promise<void> {\n const uploadUrl = await this.request('/zambda/{id}/s3-upload', 'post', baseUrlThunk.bind(this))({ id, filename });\n await fetch(uploadUrl.signedUrl, {\n method: 'PUT',\n body: file,\n });\n}\n"],"names":[],"mappings":";;AAEA,SAAS,YAAY,GAAA;;AACnB,IAAA,OAAO,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAG,eAAe,CAAC,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,mCAAmC,CAAC;AACxF,CAAC;AAEK,SAAgB,UAAU,CAE9B,EACE,EAAE,EACF,IAAI,EACJ,QAAQ,GAKT,EAAA;;QAED,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,wBAAwB,EAAE,MAAM,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClH,QAAA,MAAM,KAAK,CAAC,SAAS,CAAC,SAAS,EAAE;AAC/B,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,IAAI,EAAE,IAAI;AACX,SAAA,CAAC,CAAC;KACJ,CAAA,CAAA;AAAA;;;;"}
|
|
@@ -4,6 +4,7 @@ import { OystehrConfig } from '../../config';
|
|
|
4
4
|
import * as ext from './zambda-ext';
|
|
5
5
|
export declare class Zambda extends SDKResource {
|
|
6
6
|
constructor(config: OystehrConfig);
|
|
7
|
+
baseUrlThunk(): string;
|
|
7
8
|
uploadFile: typeof ext.uploadFile;
|
|
8
9
|
/**
|
|
9
10
|
* Get a list of all Zambda Functions in the Project. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.
|
|
@@ -7,6 +7,10 @@ class Zambda extends SDKResource {
|
|
|
7
7
|
super(config);
|
|
8
8
|
this.uploadFile = uploadFile;
|
|
9
9
|
}
|
|
10
|
+
baseUrlThunk() {
|
|
11
|
+
var _a, _b;
|
|
12
|
+
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
|
|
13
|
+
}
|
|
10
14
|
/**
|
|
11
15
|
* Get a list of all Zambda Functions in the Project. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.
|
|
12
16
|
*
|
|
@@ -14,7 +18,7 @@ class Zambda extends SDKResource {
|
|
|
14
18
|
* Access Policy Resource: `Zambda:Function`
|
|
15
19
|
*/
|
|
16
20
|
list(request) {
|
|
17
|
-
return this.request('/zambda', 'get')(request);
|
|
21
|
+
return this.request('/zambda', 'get', this.baseUrlThunk.bind(this))(request);
|
|
18
22
|
}
|
|
19
23
|
/**
|
|
20
24
|
* Create a new Zambda Function. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.
|
|
@@ -23,7 +27,7 @@ class Zambda extends SDKResource {
|
|
|
23
27
|
* Access Policy Resource: `Zambda:Function`
|
|
24
28
|
*/
|
|
25
29
|
create(params, request) {
|
|
26
|
-
return this.request('/zambda', 'post')(params, request);
|
|
30
|
+
return this.request('/zambda', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
27
31
|
}
|
|
28
32
|
/**
|
|
29
33
|
* Get the Zambda Function with the provided ID or name. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.
|
|
@@ -32,7 +36,7 @@ class Zambda extends SDKResource {
|
|
|
32
36
|
* Access Policy Resource: `Zambda:Function`
|
|
33
37
|
*/
|
|
34
38
|
get(params, request) {
|
|
35
|
-
return this.request('/zambda/{id}', 'get')(params, request);
|
|
39
|
+
return this.request('/zambda/{id}', 'get', this.baseUrlThunk.bind(this))(params, request);
|
|
36
40
|
}
|
|
37
41
|
/**
|
|
38
42
|
* Update the Zambda Function with the provided ID or name. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.
|
|
@@ -41,7 +45,7 @@ class Zambda extends SDKResource {
|
|
|
41
45
|
* Access Policy Resource: `Zambda:Function`
|
|
42
46
|
*/
|
|
43
47
|
update(params, request) {
|
|
44
|
-
return this.request('/zambda/{id}', 'patch')(params, request);
|
|
48
|
+
return this.request('/zambda/{id}', 'patch', this.baseUrlThunk.bind(this))(params, request);
|
|
45
49
|
}
|
|
46
50
|
/**
|
|
47
51
|
* Delete the Zambda Function with the provided ID or name. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.
|
|
@@ -50,7 +54,7 @@ class Zambda extends SDKResource {
|
|
|
50
54
|
* Access Policy Resource: `Zambda:Function`
|
|
51
55
|
*/
|
|
52
56
|
delete(params, request) {
|
|
53
|
-
return this.request('/zambda/{id}', 'delete')(params, request);
|
|
57
|
+
return this.request('/zambda/{id}', 'delete', this.baseUrlThunk.bind(this))(params, request);
|
|
54
58
|
}
|
|
55
59
|
/**
|
|
56
60
|
* Execute the [Authenticated Zambda Function](https://docs.oystehr.com/services/zambda/types/authenticated/) with the provided ID. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.
|
|
@@ -59,7 +63,7 @@ class Zambda extends SDKResource {
|
|
|
59
63
|
* Access Policy Resource: `Zambda:Function`
|
|
60
64
|
*/
|
|
61
65
|
execute(params, request) {
|
|
62
|
-
return this.request('/zambda/{id}/execute', 'post')(params, request);
|
|
66
|
+
return this.request('/zambda/{id}/execute', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
63
67
|
}
|
|
64
68
|
/**
|
|
65
69
|
* Execute the [Public Zambda Function](https://docs.oystehr.com/services/zambda/types/public/) with the provided ID. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.
|
|
@@ -67,7 +71,7 @@ class Zambda extends SDKResource {
|
|
|
67
71
|
* Execute a zambda that has method http_open. This endpoint is public so there are no access policy requirements.
|
|
68
72
|
*/
|
|
69
73
|
executePublic(params, request) {
|
|
70
|
-
return this.request('/zambda/{id}/execute-public', 'post')(params, request);
|
|
74
|
+
return this.request('/zambda/{id}/execute-public', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
71
75
|
}
|
|
72
76
|
/**
|
|
73
77
|
* Returns a URL that is used to deploy code to the Zambda Function with the provided ID. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.
|
|
@@ -76,7 +80,7 @@ class Zambda extends SDKResource {
|
|
|
76
80
|
* Access Policy Resource: `Zambda:Function`
|
|
77
81
|
*/
|
|
78
82
|
s3Upload(params, request) {
|
|
79
|
-
return this.request('/zambda/{id}/s3-upload', 'post')(params, request);
|
|
83
|
+
return this.request('/zambda/{id}/s3-upload', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
80
84
|
}
|
|
81
85
|
}
|
|
82
86
|
|