@icanbwell/bwell-sdk-ts 1.54.0-rc.1766511008 → 1.54.0-rc.1766513513

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * This file is automatically generated. Please do not edit this file directly.
3
3
  */
4
- export declare const VERSION = "1.54.0-rc.1766511008";
4
+ export declare const VERSION = "1.54.0-rc.1766513513";
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * This file is automatically generated. Please do not edit this file directly.
3
3
  */
4
- export const VERSION = "1.54.0-rc.1766511008";
4
+ export const VERSION = "1.54.0-rc.1766513513";
@@ -0,0 +1,13 @@
1
+ import { ErrorsCollector, ValidationRequest, Validator } from "../../../requests/index.js";
2
+ export type CreateSupportCommentRequestInput = {
3
+ body: string;
4
+ uploads?: string[];
5
+ requestId: number;
6
+ };
7
+ declare class CreateSupportCommentRequestValidator implements Validator<CreateSupportCommentRequestInput> {
8
+ validate(data: CreateSupportCommentRequestInput, errors: ErrorsCollector): void;
9
+ }
10
+ export declare class CreateSupportCommentRequest extends ValidationRequest<CreateSupportCommentRequestInput> {
11
+ protected validator: CreateSupportCommentRequestValidator;
12
+ }
13
+ export {};
@@ -0,0 +1,18 @@
1
+ import { ValidationRequest, } from "../../../requests/index.js";
2
+ import { isNullOrUndefinedOrEmptyString } from "../../../utils/type-utils.js";
3
+ class CreateSupportCommentRequestValidator {
4
+ validate(data, errors) {
5
+ if (data.requestId < 0) {
6
+ errors.add("Request ID must be a non-negative integer");
7
+ }
8
+ if (isNullOrUndefinedOrEmptyString(data.body.trim())) {
9
+ errors.add("Comment body is required");
10
+ }
11
+ }
12
+ }
13
+ export class CreateSupportCommentRequest extends ValidationRequest {
14
+ constructor() {
15
+ super(...arguments);
16
+ this.validator = new CreateSupportCommentRequestValidator();
17
+ }
18
+ }
@@ -0,0 +1,14 @@
1
+ import { ErrorsCollector, ValidationRequest, Validator } from "../../../requests/index.js";
2
+ export type GetSupportAttachmentRequestInput = {
3
+ /** The unique identifier of the support attachment. */
4
+ attachmentId: string;
5
+ /** Request ID is used to authenticate the request and validate the attachment belongs to the user. */
6
+ requestId: number;
7
+ };
8
+ declare class GetSupportAttachmentRequestValidator implements Validator<GetSupportAttachmentRequestInput> {
9
+ validate(data: GetSupportAttachmentRequestInput, errors: ErrorsCollector): void;
10
+ }
11
+ export declare class GetSupportAttachmentRequest extends ValidationRequest<GetSupportAttachmentRequestInput> {
12
+ protected validator: GetSupportAttachmentRequestValidator;
13
+ }
14
+ export {};
@@ -0,0 +1,18 @@
1
+ import { ValidationRequest, } from "../../../requests/index.js";
2
+ import { isNullOrUndefinedOrEmptyString } from "../../../utils/type-utils.js";
3
+ class GetSupportAttachmentRequestValidator {
4
+ validate(data, errors) {
5
+ if (isNullOrUndefinedOrEmptyString(data.attachmentId.trim())) {
6
+ errors.add("attachmentId must be a non-empty string");
7
+ }
8
+ if (data.requestId < 0) {
9
+ errors.add("requestId must be a non-negative number");
10
+ }
11
+ }
12
+ }
13
+ export class GetSupportAttachmentRequest extends ValidationRequest {
14
+ constructor() {
15
+ super(...arguments);
16
+ this.validator = new GetSupportAttachmentRequestValidator();
17
+ }
18
+ }
@@ -5,3 +5,5 @@ export * from "./delete-support-attachment-request.js";
5
5
  export * from "./create-support-request-request.js";
6
6
  export * from "./get-support-articles-request.js";
7
7
  export * from "./get-support-comments-request.js";
8
+ export * from "./create-support-comment-request.js";
9
+ export * from "./get-support-attachment-request.js";
@@ -5,3 +5,5 @@ export * from "./delete-support-attachment-request.js";
5
5
  export * from "./create-support-request-request.js";
6
6
  export * from "./get-support-articles-request.js";
7
7
  export * from "./get-support-comments-request.js";
8
+ export * from "./create-support-comment-request.js";
9
+ export * from "./get-support-attachment-request.js";
@@ -1,9 +1,11 @@
1
- import type { CreateSupportRequestMutationResults, DeleteSupportAttachmentMutationResults, GetSupportArticlesQueryResults, GetSupportCategoriesQueryResults, GetSupportCommentsQueryResults, GetSupportRequestsQueryResults, UploadSupportAttachmentMutationResults } from "../../../graphql/operations/types.js";
1
+ import type { CreateSupportCommentMutationResults, CreateSupportRequestMutationResults, DeleteSupportAttachmentMutationResults, GetSupportArticlesQueryResults, GetSupportAttachmentQueryResults, GetSupportCategoriesQueryResults, GetSupportCommentsQueryResults, GetSupportRequestsQueryResults, UploadSupportAttachmentMutationResults } from "../../../graphql/operations/types.js";
2
2
  import type { BWellQueryResult, BWellTransactionResult } from "../../../results/index.js";
3
3
  import type { BaseManagerError } from "../errors.js";
4
+ import { CreateSupportCommentRequest } from "./create-support-comment-request.js";
4
5
  import { CreateSupportRequestRequest } from "./create-support-request-request.js";
5
6
  import { DeleteSupportAttachmentRequest } from "./delete-support-attachment-request.js";
6
7
  import { GetSupportArticlesRequest } from "./get-support-articles-request.js";
8
+ import { GetSupportAttachmentRequest } from "./get-support-attachment-request.js";
7
9
  import { GetSupportCommentsRequest } from "./get-support-comments-request.js";
8
10
  import { GetSupportRequestsRequest } from "./get-support-requests-request.js";
9
11
  import { UploadSupportAttachmentRequest } from "./upload-support-attachment-request.js";
@@ -14,6 +16,8 @@ export type CreateSupportRequestResults = CreateSupportRequestMutationResults["c
14
16
  export type GetSupportCategoriesResults = GetSupportCategoriesQueryResults["getSupportCategories"];
15
17
  export type GetSupportArticlesResults = GetSupportArticlesQueryResults["getSupportArticles"];
16
18
  export type GetSupportCommentsResults = GetSupportCommentsQueryResults["getSupportComments"];
19
+ export type CreateSupportCommentResults = CreateSupportCommentMutationResults["createSupportComment"];
20
+ export type GetSupportAttachmentResults = GetSupportAttachmentQueryResults["getSupportAttachment"];
17
21
  /**
18
22
  * The SupportManager interface provides methods for managing support requests.
19
23
  */
@@ -59,4 +63,16 @@ export interface SupportManager {
59
63
  * @returns A promise that resolves to a query result with the support comments data.
60
64
  */
61
65
  getSupportComments(request: GetSupportCommentsRequest): Promise<BWellQueryResult<GetSupportCommentsResults, BaseManagerError>>;
66
+ /**
67
+ * Creates a comment on a specific support request.
68
+ * @param request The request containing the comment body, uploads and request ID.
69
+ * @returns A promise that resolves to a transaction result with the created support comment data.
70
+ */
71
+ createSupportComment(request: CreateSupportCommentRequest): Promise<BWellTransactionResult<CreateSupportCommentResults, BaseManagerError>>;
72
+ /**
73
+ * Retrieves a support attachment by attachment ID and request ID.
74
+ * @param request The request containing the attachment ID and request ID.
75
+ * @returns A promise that resolves to a query result with the support attachment data.
76
+ */
77
+ getSupportAttachment(request: GetSupportAttachmentRequest): Promise<BWellQueryResult<GetSupportAttachmentResults, BaseManagerError>>;
62
78
  }
@@ -0,0 +1,6 @@
1
+ import { CreateSupportCommentMutationVariables } from "../../../graphql/operations/types.js";
2
+ import { RequestFactory } from "../../../requests/request.js";
3
+ import { CreateSupportCommentRequest } from "../../base/index.js";
4
+ export declare class GraphQLCreateSupportCommentRequestFactory implements RequestFactory<CreateSupportCommentRequest, CreateSupportCommentMutationVariables> {
5
+ create(request: CreateSupportCommentRequest): CreateSupportCommentMutationVariables;
6
+ }
@@ -0,0 +1,12 @@
1
+ export class GraphQLCreateSupportCommentRequestFactory {
2
+ create(request) {
3
+ const data = request.data();
4
+ return {
5
+ input: {
6
+ requestId: data.requestId,
7
+ body: data.body,
8
+ uploads: data.uploads,
9
+ },
10
+ };
11
+ }
12
+ }
@@ -0,0 +1,6 @@
1
+ import { GetSupportAttachmentQueryVariables } from "../../../graphql/operations/types.js";
2
+ import { RequestFactory } from "../../../requests/request.js";
3
+ import { GetSupportAttachmentRequest } from "../../base/index.js";
4
+ export declare class GraphQLGetSupportAttachmentRequestFactory implements RequestFactory<GetSupportAttachmentRequest, GetSupportAttachmentQueryVariables> {
5
+ create(request: GetSupportAttachmentRequest): GetSupportAttachmentQueryVariables;
6
+ }
@@ -0,0 +1,11 @@
1
+ export class GraphQLGetSupportAttachmentRequestFactory {
2
+ create(request) {
3
+ const data = request.data();
4
+ return {
5
+ input: {
6
+ requestId: data.requestId,
7
+ attachmentId: data.attachmentId,
8
+ },
9
+ };
10
+ }
11
+ }
@@ -1,21 +1,21 @@
1
- import { CreateSupportRequestMutationVariables, DeleteSupportAttachmentMutationVariables, GetSupportArticlesQueryVariables, GetSupportCommentsQueryVariables, GetSupportRequestsQueryVariables, UploadSupportAttachmentMutationVariables } from "../../../graphql/operations/types.js";
1
+ import { CreateSupportCommentMutationVariables, CreateSupportRequestMutationVariables, DeleteSupportAttachmentMutationVariables, GetSupportArticlesQueryVariables, GetSupportAttachmentQueryVariables, GetSupportCommentsQueryVariables, GetSupportRequestsQueryVariables, UploadSupportAttachmentMutationVariables } from "../../../graphql/operations/types.js";
2
2
  import { LoggerProvider } from "../../../logger/index.js";
3
3
  import { RequestFactory } from "../../../requests/index.js";
4
4
  import { BWellQueryResult, BWellTransactionResult } from "../../../results/index.js";
5
5
  import { BaseManagerError } from "../../base/errors.js";
6
- import { GetSupportCommentsRequest } from "../../base/index.js";
6
+ import { CreateSupportCommentRequest, GetSupportAttachmentRequest, GetSupportCommentsRequest } from "../../base/index.js";
7
7
  import { CreateSupportRequestRequest } from "../../base/support/create-support-request-request.js";
8
8
  import { DeleteSupportAttachmentRequest } from "../../base/support/delete-support-attachment-request.js";
9
9
  import { GetSupportArticlesRequest } from "../../base/support/get-support-articles-request.js";
10
10
  import { GetSupportRequestsRequest } from "../../base/support/get-support-requests-request.js";
11
11
  import type { SupportManager } from "../../base/support/support-manager.js";
12
- import { CreateSupportRequestResults, DeleteSupportAttachmentResults, GetSupportArticlesResults, GetSupportCategoriesResults, GetSupportCommentsResults, GetSupportRequestsResults, UploadSupportAttachmentResults } from "../../base/support/support-manager.js";
12
+ import { CreateSupportCommentResults, CreateSupportRequestResults, DeleteSupportAttachmentResults, GetSupportArticlesResults, GetSupportAttachmentResults, GetSupportCategoriesResults, GetSupportCommentsResults, GetSupportRequestsResults, UploadSupportAttachmentResults } from "../../base/support/support-manager.js";
13
13
  import { UploadSupportAttachmentRequest } from "../../base/support/upload-support-attachment-request.js";
14
14
  import { GraphQLManager } from "../graphql-manager/index.js";
15
15
  import type { GraphQLSdk } from "../graphql-sdk/index.js";
16
16
  export declare class GraphQLSupportManager extends GraphQLManager implements SupportManager {
17
17
  #private;
18
- constructor(sdk: GraphQLSdk, loggerProvider?: LoggerProvider, getSupportRequestsRequestFactory?: RequestFactory<GetSupportRequestsRequest, GetSupportRequestsQueryVariables>, uploadSupportAttachmentRequestFactory?: RequestFactory<UploadSupportAttachmentRequest, UploadSupportAttachmentMutationVariables>, deleteSupportAttachmentRequestFactory?: RequestFactory<DeleteSupportAttachmentRequest, DeleteSupportAttachmentMutationVariables>, createSupportRequestRequestFactory?: RequestFactory<CreateSupportRequestRequest, CreateSupportRequestMutationVariables>, getSupportArticlesRequestFactory?: RequestFactory<GetSupportArticlesRequest, GetSupportArticlesQueryVariables>, getSupportCommentsRequestFactory?: RequestFactory<GetSupportCommentsRequest, GetSupportCommentsQueryVariables>);
18
+ constructor(sdk: GraphQLSdk, loggerProvider?: LoggerProvider, getSupportRequestsRequestFactory?: RequestFactory<GetSupportRequestsRequest, GetSupportRequestsQueryVariables>, uploadSupportAttachmentRequestFactory?: RequestFactory<UploadSupportAttachmentRequest, UploadSupportAttachmentMutationVariables>, deleteSupportAttachmentRequestFactory?: RequestFactory<DeleteSupportAttachmentRequest, DeleteSupportAttachmentMutationVariables>, createSupportRequestRequestFactory?: RequestFactory<CreateSupportRequestRequest, CreateSupportRequestMutationVariables>, getSupportArticlesRequestFactory?: RequestFactory<GetSupportArticlesRequest, GetSupportArticlesQueryVariables>, getSupportCommentsRequestFactory?: RequestFactory<GetSupportCommentsRequest, GetSupportCommentsQueryVariables>, createSupportCommentRequestFactory?: RequestFactory<CreateSupportCommentRequest, CreateSupportCommentMutationVariables>, getSupportAttachmentsRequestFactory?: RequestFactory<GetSupportAttachmentRequest, GetSupportAttachmentQueryVariables>);
19
19
  getSupportRequests(request: GetSupportRequestsRequest): Promise<BWellQueryResult<GetSupportRequestsResults, BaseManagerError>>;
20
20
  uploadSupportAttachment(request: UploadSupportAttachmentRequest): Promise<BWellTransactionResult<UploadSupportAttachmentResults, BaseManagerError>>;
21
21
  deleteSupportAttachment(request: DeleteSupportAttachmentRequest): Promise<BWellTransactionResult<DeleteSupportAttachmentResults, BaseManagerError>>;
@@ -23,4 +23,6 @@ export declare class GraphQLSupportManager extends GraphQLManager implements Sup
23
23
  getSupportCategories(): Promise<BWellQueryResult<GetSupportCategoriesResults, BaseManagerError>>;
24
24
  getSupportArticles(request: GetSupportArticlesRequest): Promise<BWellQueryResult<GetSupportArticlesResults, BaseManagerError>>;
25
25
  getSupportComments(request: GetSupportCommentsRequest): Promise<BWellQueryResult<GetSupportCommentsResults, BaseManagerError>>;
26
+ createSupportComment(request: CreateSupportCommentRequest): Promise<BWellTransactionResult<CreateSupportCommentResults, BaseManagerError>>;
27
+ getSupportAttachment(request: GetSupportAttachmentRequest): Promise<BWellQueryResult<GetSupportAttachmentResults, BaseManagerError>>;
26
28
  }
@@ -18,18 +18,20 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
18
18
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
19
19
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
20
20
  };
21
- var _GraphQLSupportManager_sdk, _GraphQLSupportManager_logger, _GraphQLSupportManager_getSupportRequestsRequestFactory, _GraphQLSupportManager_uploadSupportAttachmentRequestFactory, _GraphQLSupportManager_deleteSupportAttachmentRequestFactory, _GraphQLSupportManager_createSupportRequestRequestFactory, _GraphQLSupportManager_getSupportArticlesRequestFactory, _GraphQLSupportManager_getSupportCommentsRequestFactory;
21
+ var _GraphQLSupportManager_sdk, _GraphQLSupportManager_logger, _GraphQLSupportManager_getSupportRequestsRequestFactory, _GraphQLSupportManager_uploadSupportAttachmentRequestFactory, _GraphQLSupportManager_deleteSupportAttachmentRequestFactory, _GraphQLSupportManager_createSupportRequestRequestFactory, _GraphQLSupportManager_getSupportArticlesRequestFactory, _GraphQLSupportManager_getSupportCommentsRequestFactory, _GraphQLSupportManager_createSupportCommentRequestFactory, _GraphQLSupportManager_getSupportAttachmentsRequestFactory;
22
22
  import { ConsoleLoggerProvider, } from "../../../logger/index.js";
23
23
  import { BWellQueryResult, BWellTransactionResult, } from "../../../results/index.js";
24
24
  import { GraphQLManager } from "../graphql-manager/index.js";
25
+ import { GraphQLCreateSupportCommentRequestFactory } from "./create-support-comment-request-factory.js";
25
26
  import { GraphQLCreateSupportRequestRequestFactory } from "./create-support-request-request-factory.js";
26
27
  import { GraphQLDeleteSupportAttachmentRequestFactory } from "./delete-support-attachment-request-factory.js";
27
28
  import { GraphQLGetSupportArticlesBwellRequestFactory } from "./get-support-articles-bwell-request-factory.js";
29
+ import { GraphQLGetSupportAttachmentRequestFactory } from "./get-support-attachment-request-factory.js";
28
30
  import { GraphQLGetSupportCommentsBwellRequestFactory } from "./get-support-comments-bwell-request-factory.js";
29
31
  import { GraphQLGetSupportRequestsBwellRequestFactory } from "./get-support-requests-bwell-request-factory.js";
30
32
  import { GraphQLUploadSupportAttachmentRequestFactory } from "./upload-support-attachment-request-factory.js";
31
33
  export class GraphQLSupportManager extends GraphQLManager {
32
- constructor(sdk, loggerProvider = new ConsoleLoggerProvider(), getSupportRequestsRequestFactory = new GraphQLGetSupportRequestsBwellRequestFactory(), uploadSupportAttachmentRequestFactory = new GraphQLUploadSupportAttachmentRequestFactory(), deleteSupportAttachmentRequestFactory = new GraphQLDeleteSupportAttachmentRequestFactory(), createSupportRequestRequestFactory = new GraphQLCreateSupportRequestRequestFactory(), getSupportArticlesRequestFactory = new GraphQLGetSupportArticlesBwellRequestFactory(), getSupportCommentsRequestFactory = new GraphQLGetSupportCommentsBwellRequestFactory()) {
34
+ constructor(sdk, loggerProvider = new ConsoleLoggerProvider(), getSupportRequestsRequestFactory = new GraphQLGetSupportRequestsBwellRequestFactory(), uploadSupportAttachmentRequestFactory = new GraphQLUploadSupportAttachmentRequestFactory(), deleteSupportAttachmentRequestFactory = new GraphQLDeleteSupportAttachmentRequestFactory(), createSupportRequestRequestFactory = new GraphQLCreateSupportRequestRequestFactory(), getSupportArticlesRequestFactory = new GraphQLGetSupportArticlesBwellRequestFactory(), getSupportCommentsRequestFactory = new GraphQLGetSupportCommentsBwellRequestFactory(), createSupportCommentRequestFactory = new GraphQLCreateSupportCommentRequestFactory(), getSupportAttachmentsRequestFactory = new GraphQLGetSupportAttachmentRequestFactory()) {
33
35
  super();
34
36
  _GraphQLSupportManager_sdk.set(this, void 0);
35
37
  _GraphQLSupportManager_logger.set(this, void 0);
@@ -39,6 +41,8 @@ export class GraphQLSupportManager extends GraphQLManager {
39
41
  _GraphQLSupportManager_createSupportRequestRequestFactory.set(this, void 0);
40
42
  _GraphQLSupportManager_getSupportArticlesRequestFactory.set(this, void 0);
41
43
  _GraphQLSupportManager_getSupportCommentsRequestFactory.set(this, void 0);
44
+ _GraphQLSupportManager_createSupportCommentRequestFactory.set(this, void 0);
45
+ _GraphQLSupportManager_getSupportAttachmentsRequestFactory.set(this, void 0);
42
46
  __classPrivateFieldSet(this, _GraphQLSupportManager_sdk, sdk, "f");
43
47
  __classPrivateFieldSet(this, _GraphQLSupportManager_logger, loggerProvider.getLogger("GraphQLSupportManager"), "f");
44
48
  __classPrivateFieldSet(this, _GraphQLSupportManager_getSupportRequestsRequestFactory, getSupportRequestsRequestFactory, "f");
@@ -47,6 +51,8 @@ export class GraphQLSupportManager extends GraphQLManager {
47
51
  __classPrivateFieldSet(this, _GraphQLSupportManager_createSupportRequestRequestFactory, createSupportRequestRequestFactory, "f");
48
52
  __classPrivateFieldSet(this, _GraphQLSupportManager_getSupportArticlesRequestFactory, getSupportArticlesRequestFactory, "f");
49
53
  __classPrivateFieldSet(this, _GraphQLSupportManager_getSupportCommentsRequestFactory, getSupportCommentsRequestFactory, "f");
54
+ __classPrivateFieldSet(this, _GraphQLSupportManager_createSupportCommentRequestFactory, createSupportCommentRequestFactory, "f");
55
+ __classPrivateFieldSet(this, _GraphQLSupportManager_getSupportAttachmentsRequestFactory, getSupportAttachmentsRequestFactory, "f");
50
56
  }
51
57
  getSupportRequests(request) {
52
58
  return __awaiter(this, void 0, void 0, function* () {
@@ -165,5 +171,40 @@ export class GraphQLSupportManager extends GraphQLManager {
165
171
  return new BWellQueryResult((_a = result.data) === null || _a === void 0 ? void 0 : _a.getSupportComments, result.error);
166
172
  });
167
173
  }
174
+ createSupportComment(request) {
175
+ return __awaiter(this, void 0, void 0, function* () {
176
+ const validationResult = this.validateRequest(request);
177
+ if (validationResult.failure()) {
178
+ return validationResult.intoFailure();
179
+ }
180
+ const inputVariables = __classPrivateFieldGet(this, _GraphQLSupportManager_createSupportCommentRequestFactory, "f").create(request);
181
+ __classPrivateFieldGet(this, _GraphQLSupportManager_logger, "f").verbose("calling createSupportComment mutation...");
182
+ const result = yield this.handleTransaction(__classPrivateFieldGet(this, _GraphQLSupportManager_sdk, "f").CreateSupportComment(inputVariables));
183
+ __classPrivateFieldGet(this, _GraphQLSupportManager_logger, "f").verbose("createSupportComment mutation complete.");
184
+ if (result.failure()) {
185
+ __classPrivateFieldGet(this, _GraphQLSupportManager_logger, "f").error("createSupportComment mutation error", result);
186
+ return result.intoFailure();
187
+ }
188
+ __classPrivateFieldGet(this, _GraphQLSupportManager_logger, "f").info("createSupportComment mutation success");
189
+ return BWellTransactionResult.success(result.data().createSupportComment);
190
+ });
191
+ }
192
+ getSupportAttachment(request) {
193
+ return __awaiter(this, void 0, void 0, function* () {
194
+ var _a;
195
+ const validationResult = this.validateRequest(request);
196
+ if (validationResult.failure()) {
197
+ return validationResult.toQueryResult();
198
+ }
199
+ const inputVariables = __classPrivateFieldGet(this, _GraphQLSupportManager_getSupportAttachmentsRequestFactory, "f").create(request);
200
+ __classPrivateFieldGet(this, _GraphQLSupportManager_logger, "f").verbose("calling getSupportAttachment query...");
201
+ const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLSupportManager_sdk, "f").GetSupportAttachment(inputVariables));
202
+ __classPrivateFieldGet(this, _GraphQLSupportManager_logger, "f").verbose("getSupportAttachment query complete.");
203
+ if (result.hasError()) {
204
+ __classPrivateFieldGet(this, _GraphQLSupportManager_logger, "f").error("getSupportAttachment query error", result.error);
205
+ }
206
+ return new BWellQueryResult((_a = result.data) === null || _a === void 0 ? void 0 : _a.getSupportAttachment, result.error);
207
+ });
208
+ }
168
209
  }
169
- _GraphQLSupportManager_sdk = new WeakMap(), _GraphQLSupportManager_logger = new WeakMap(), _GraphQLSupportManager_getSupportRequestsRequestFactory = new WeakMap(), _GraphQLSupportManager_uploadSupportAttachmentRequestFactory = new WeakMap(), _GraphQLSupportManager_deleteSupportAttachmentRequestFactory = new WeakMap(), _GraphQLSupportManager_createSupportRequestRequestFactory = new WeakMap(), _GraphQLSupportManager_getSupportArticlesRequestFactory = new WeakMap(), _GraphQLSupportManager_getSupportCommentsRequestFactory = new WeakMap();
210
+ _GraphQLSupportManager_sdk = new WeakMap(), _GraphQLSupportManager_logger = new WeakMap(), _GraphQLSupportManager_getSupportRequestsRequestFactory = new WeakMap(), _GraphQLSupportManager_uploadSupportAttachmentRequestFactory = new WeakMap(), _GraphQLSupportManager_deleteSupportAttachmentRequestFactory = new WeakMap(), _GraphQLSupportManager_createSupportRequestRequestFactory = new WeakMap(), _GraphQLSupportManager_getSupportArticlesRequestFactory = new WeakMap(), _GraphQLSupportManager_getSupportCommentsRequestFactory = new WeakMap(), _GraphQLSupportManager_createSupportCommentRequestFactory = new WeakMap(), _GraphQLSupportManager_getSupportAttachmentsRequestFactory = new WeakMap();
@@ -152,9 +152,11 @@ export declare const SaveQuestionnaireResponseDocument = "\n mutation saveQue
152
152
  export declare const ProviderSearchDocument = "\n query providerSearch($client: [Client], $searchTerm: String, $includePopulatedPROAonly: Boolean, $specialtyFilters: [InputCoding], $organizationTypeFilters: [OrganizationType], $gender: Gender, $location: SearchPosition, $sortBy: [OrderBy], $filterFields: [FilterField], $page: Int, $pageSize: Int) {\n providers(\n client: $client\n search: $searchTerm\n specialty: $specialtyFilters\n organization_type: $organizationTypeFilters\n include_populated_PROA_only: $includePopulatedPROAonly\n gender: $gender\n search_position: $location\n order_by: $sortBy\n filter_values: $filterFields\n page_number: $page\n page_size: $pageSize\n ) {\n paging_info {\n page_number\n page_size\n total_items\n total_pages\n }\n filter_values {\n field\n values {\n value\n count\n }\n }\n results {\n endpoint {\n identifier {\n type {\n coding {\n code\n system\n display\n }\n text\n }\n value\n system\n }\n name\n status\n connectionType {\n code\n system\n display\n }\n address\n }\n iconString\n organization_type {\n coding {\n code\n system\n display\n }\n text\n }\n content\n gender\n location {\n name\n identifier {\n type {\n text\n coding {\n system\n code\n display\n }\n }\n value\n system\n }\n alias\n description\n address {\n use\n type\n text\n line\n city\n district\n state\n postalCode\n country\n }\n position {\n lat\n lon\n }\n distanceInMiles\n telecom {\n system\n value\n rank\n }\n }\n specialty {\n code\n system\n display\n }\n id\n photo {\n contentType\n url\n title\n }\n name {\n ...HumanNameFields\n }\n telecom {\n system\n value\n rank\n }\n practitioner_qualification {\n identifier {\n type {\n coding {\n code\n system\n display\n }\n text\n }\n value\n system\n }\n code {\n coding {\n code\n system\n display\n }\n text\n }\n period {\n start\n end\n }\n issuer {\n reference\n display\n }\n }\n provider_type\n characteristic {\n code\n system\n display\n }\n organization {\n name\n endpoint {\n identifier {\n type {\n coding {\n code\n system\n display\n }\n text\n }\n value\n system\n }\n name\n status\n connectionType {\n code\n system\n display\n }\n address\n }\n }\n }\n }\n}\n \n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n ";
153
153
  export declare const RequestConnectionDocument = "\n mutation requestConnection($city: String, $institution: String, $provider: String, $state: String) {\n requestConnection(\n city: $city\n institution: $institution\n provider: $provider\n state: $state\n ) {\n resourceType\n issue {\n severity\n code\n details {\n text\n }\n }\n }\n}\n ";
154
154
  export declare const SearchHealthResourcesDocument = "\n query SearchHealthResources($searchInput: SearchHealthResourcesInput) {\n searchHealthResources(searchInput: $searchInput) {\n pagingInfo {\n pageNumber\n pageSize\n totalItems\n totalPages\n }\n filterValues {\n field\n values {\n value\n count\n }\n }\n results {\n type\n id\n content\n specialty {\n code\n system\n display\n }\n bookable {\n online\n phone\n }\n location {\n scheduling {\n identifier {\n value\n system\n }\n bookable {\n online\n phone\n }\n }\n name\n address {\n line\n city\n state\n postalCode\n country\n }\n position {\n latitude\n longitude\n }\n telecom {\n system\n value\n }\n distanceInMiles\n }\n organization {\n name\n endpoint {\n name\n status\n address\n }\n }\n npi\n gender\n iconString\n endpoint {\n identifier {\n type {\n coding {\n code\n system\n display\n }\n text\n }\n value\n system\n }\n name\n status\n connectionType {\n code\n system\n display\n }\n address\n }\n score\n scores {\n value\n description\n calculation\n }\n }\n }\n}\n ";
155
+ export declare const CreateSupportCommentDocument = "\n mutation CreateSupportComment($input: CreateSupportCommentInput!) {\n createSupportComment(input: $input) {\n comment {\n id\n body\n htmlBody\n author {\n name\n email\n }\n attachments {\n id\n fileName\n contentType\n size\n }\n createdAt\n }\n }\n}\n ";
155
156
  export declare const CreateSupportRequestDocument = "\n mutation CreateSupportRequest($input: CreateSupportRequestInput!) {\n createSupportRequest(input: $input) {\n data {\n id\n subject\n category\n created\n lastActivity\n status\n }\n }\n}\n ";
156
157
  export declare const DeleteSupportAttachmentDocument = "\n mutation DeleteSupportAttachment($input: DeleteSupportAttachmentInput!) {\n deleteSupportAttachment(input: $input) {\n status\n }\n}\n ";
157
158
  export declare const GetSupportArticlesDocument = "\n query getSupportArticles($input: SupportArticlesInput) {\n getSupportArticles(input: $input) {\n data {\n id\n title\n body\n snippet\n createdAt\n updatedAt\n labelNames\n }\n paging_info {\n page_number\n page_size\n total_items\n total_pages\n }\n }\n}\n ";
159
+ export declare const GetSupportAttachmentDocument = "\n query GetSupportAttachment($input: SupportAttachmentInput!) {\n getSupportAttachment(input: $input) {\n attachment\n contentType\n name\n }\n}\n ";
158
160
  export declare const GetSupportCategoriesDocument = "\n query GetSupportCategories {\n getSupportCategories {\n label\n value\n }\n}\n ";
159
161
  export declare const GetSupportCommentsDocument = "\n query getSupportComments($input: SupportCommentsInput!) {\n getSupportComments(input: $input) {\n comments {\n id\n body\n htmlBody\n author {\n name\n email\n }\n attachments {\n id\n fileName\n contentType\n size\n }\n createdAt\n }\n paging_info {\n page_number\n page_size\n total_items\n total_pages\n }\n }\n}\n ";
160
162
  export declare const GetSupportRequestsDocument = "\n query getSupportRequests($input: SupportRequestsInput) {\n getSupportRequests(input: $input) {\n paging_info {\n page_number\n page_size\n total_items\n total_pages\n }\n data {\n category\n created\n id\n lastActivity\n status\n subject\n }\n }\n}\n ";
@@ -617,6 +619,13 @@ export declare function getSdk(client: GraphQLClient, withWrapper?: SdkFunctionW
617
619
  headers: Headers;
618
620
  status: number;
619
621
  }>;
622
+ CreateSupportComment(variables: Types.CreateSupportCommentMutationVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise<{
623
+ data: Types.CreateSupportCommentMutationResults;
624
+ errors?: GraphQLError[];
625
+ extensions?: any;
626
+ headers: Headers;
627
+ status: number;
628
+ }>;
620
629
  CreateSupportRequest(variables: Types.CreateSupportRequestMutationVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise<{
621
630
  data: Types.CreateSupportRequestMutationResults;
622
631
  errors?: GraphQLError[];
@@ -638,6 +647,13 @@ export declare function getSdk(client: GraphQLClient, withWrapper?: SdkFunctionW
638
647
  headers: Headers;
639
648
  status: number;
640
649
  }>;
650
+ GetSupportAttachment(variables: Types.GetSupportAttachmentQueryVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise<{
651
+ data: Types.GetSupportAttachmentQueryResults;
652
+ errors?: GraphQLError[];
653
+ extensions?: any;
654
+ headers: Headers;
655
+ status: number;
656
+ }>;
641
657
  GetSupportCategories(variables?: Types.GetSupportCategoriesQueryVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise<{
642
658
  data: Types.GetSupportCategoriesQueryResults;
643
659
  errors?: GraphQLError[];
@@ -3896,6 +3896,28 @@ export const SearchHealthResourcesDocument = `
3896
3896
  }
3897
3897
  }
3898
3898
  `;
3899
+ export const CreateSupportCommentDocument = `
3900
+ mutation CreateSupportComment($input: CreateSupportCommentInput!) {
3901
+ createSupportComment(input: $input) {
3902
+ comment {
3903
+ id
3904
+ body
3905
+ htmlBody
3906
+ author {
3907
+ name
3908
+ email
3909
+ }
3910
+ attachments {
3911
+ id
3912
+ fileName
3913
+ contentType
3914
+ size
3915
+ }
3916
+ createdAt
3917
+ }
3918
+ }
3919
+ }
3920
+ `;
3899
3921
  export const CreateSupportRequestDocument = `
3900
3922
  mutation CreateSupportRequest($input: CreateSupportRequestInput!) {
3901
3923
  createSupportRequest(input: $input) {
@@ -3938,6 +3960,15 @@ export const GetSupportArticlesDocument = `
3938
3960
  }
3939
3961
  }
3940
3962
  `;
3963
+ export const GetSupportAttachmentDocument = `
3964
+ query GetSupportAttachment($input: SupportAttachmentInput!) {
3965
+ getSupportAttachment(input: $input) {
3966
+ attachment
3967
+ contentType
3968
+ name
3969
+ }
3970
+ }
3971
+ `;
3941
3972
  export const GetSupportCategoriesDocument = `
3942
3973
  query GetSupportCategories {
3943
3974
  getSupportCategories {
@@ -4409,6 +4440,9 @@ export function getSdk(client, withWrapper = defaultWrapper) {
4409
4440
  SearchHealthResources(variables, requestHeaders) {
4410
4441
  return withWrapper((wrappedRequestHeaders) => client.rawRequest(SearchHealthResourcesDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'SearchHealthResources', 'query', variables);
4411
4442
  },
4443
+ CreateSupportComment(variables, requestHeaders) {
4444
+ return withWrapper((wrappedRequestHeaders) => client.rawRequest(CreateSupportCommentDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'CreateSupportComment', 'mutation', variables);
4445
+ },
4412
4446
  CreateSupportRequest(variables, requestHeaders) {
4413
4447
  return withWrapper((wrappedRequestHeaders) => client.rawRequest(CreateSupportRequestDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'CreateSupportRequest', 'mutation', variables);
4414
4448
  },
@@ -4418,6 +4452,9 @@ export function getSdk(client, withWrapper = defaultWrapper) {
4418
4452
  getSupportArticles(variables, requestHeaders) {
4419
4453
  return withWrapper((wrappedRequestHeaders) => client.rawRequest(GetSupportArticlesDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getSupportArticles', 'query', variables);
4420
4454
  },
4455
+ GetSupportAttachment(variables, requestHeaders) {
4456
+ return withWrapper((wrappedRequestHeaders) => client.rawRequest(GetSupportAttachmentDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'GetSupportAttachment', 'query', variables);
4457
+ },
4421
4458
  GetSupportCategories(variables, requestHeaders) {
4422
4459
  return withWrapper((wrappedRequestHeaders) => client.rawRequest(GetSupportCategoriesDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'GetSupportCategories', 'query', variables);
4423
4460
  },
@@ -22333,6 +22333,29 @@ export type SearchHealthResourcesQueryResults = {
22333
22333
  } | null> | null;
22334
22334
  };
22335
22335
  };
22336
+ export type CreateSupportCommentMutationVariables = Types.Exact<{
22337
+ input: Types.CreateSupportCommentInput;
22338
+ }>;
22339
+ export type CreateSupportCommentMutationResults = {
22340
+ createSupportComment: {
22341
+ comment: {
22342
+ id: string;
22343
+ body: string;
22344
+ htmlBody: string;
22345
+ createdAt: string;
22346
+ author: {
22347
+ name: string;
22348
+ email: string;
22349
+ };
22350
+ attachments: Array<{
22351
+ id: string;
22352
+ fileName: string;
22353
+ contentType: string;
22354
+ size: number;
22355
+ }>;
22356
+ };
22357
+ };
22358
+ };
22336
22359
  export type CreateSupportRequestMutationVariables = Types.Exact<{
22337
22360
  input: Types.CreateSupportRequestInput;
22338
22361
  }>;
@@ -22378,6 +22401,16 @@ export type GetSupportArticlesQueryResults = {
22378
22401
  };
22379
22402
  };
22380
22403
  };
22404
+ export type GetSupportAttachmentQueryVariables = Types.Exact<{
22405
+ input: Types.SupportAttachmentInput;
22406
+ }>;
22407
+ export type GetSupportAttachmentQueryResults = {
22408
+ getSupportAttachment: {
22409
+ attachment: string;
22410
+ contentType: string;
22411
+ name: string;
22412
+ };
22413
+ };
22381
22414
  export type GetSupportCategoriesQueryVariables = Types.Exact<{
22382
22415
  [key: string]: never;
22383
22416
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icanbwell/bwell-sdk-ts",
3
- "version": "1.54.0-rc.1766511008",
3
+ "version": "1.54.0-rc.1766513513",
4
4
  "description": "b.well TypeScript SDK",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",