@longvansoftware/storefront-js-client 3.0.1 → 3.0.2

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.
@@ -144,7 +144,25 @@ exports.CREATE_USER_DETAIL_MUTATION = (0, graphql_tag_1.gql) `
144
144
  `;
145
145
  exports.CREATE_ORG_MUTATION = (0, graphql_tag_1.gql) `
146
146
  mutation CreateOrg($orgName: String!) {
147
- createOrg(orgName: $orgName)
147
+ createOrg(orgName: $orgName) {
148
+ id
149
+ partyId
150
+ codeId
151
+ groupName
152
+ groupType
153
+ shortName
154
+ groupNameLocal
155
+ officeSiteName
156
+ comments
157
+ logoImageUrl
158
+ isIncorporated
159
+ federalTaxId
160
+ description
161
+ deleted
162
+ status
163
+ positionIndexId
164
+ prefix
165
+ }
148
166
  }
149
167
  `;
150
168
  exports.ADD_ROLE_USER_MUTATION = (0, graphql_tag_1.gql) `
@@ -1,5 +1,5 @@
1
1
  import { Service } from "../serviceSDK";
2
- import { LoginRequest, LoginResponse, RegisterRequest, SendOTPResponse, ValidateOTPResponse, CreateUserLoginResponse, GetAccessTokenByOTPResponse } from "../../types/auth";
2
+ import { LoginRequest, LoginResponse, RegisterRequest, SendOTPResponse, ValidateOTPResponse, CreateUserLoginResponse, GetAccessTokenByOTPResponse, CreateOrgResponse } from "../../types/auth";
3
3
  /**
4
4
  * Represents the authentication service.
5
5
  */
@@ -54,10 +54,10 @@ export declare class AuthService extends Service {
54
54
  * Creates a new organization.
55
55
  *
56
56
  * @param orgName - The name of the organization to create.
57
- * @returns A promise that resolves to the result of the createOrg mutation.
57
+ * @returns A promise that resolves to the created organization details.
58
58
  * @throws Will throw an error if the GraphQL mutation fails.
59
59
  */
60
- createOrg(orgName: string): Promise<any>;
60
+ createOrg(orgName: string): Promise<CreateOrgResponse>;
61
61
  /**
62
62
  * Adds a role to a user in an organization.
63
63
  *
@@ -306,7 +306,7 @@ class AuthService extends serviceSDK_1.Service {
306
306
  * Creates a new organization.
307
307
  *
308
308
  * @param orgName - The name of the organization to create.
309
- * @returns A promise that resolves to the result of the createOrg mutation.
309
+ * @returns A promise that resolves to the created organization details.
310
310
  * @throws Will throw an error if the GraphQL mutation fails.
311
311
  */
312
312
  createOrg(orgName) {
@@ -157,3 +157,43 @@ export interface GetAccessTokenByOTPResponse {
157
157
  /** The access token string */
158
158
  accessToken: string;
159
159
  }
160
+ /**
161
+ * Response interface for creating organization
162
+ * Returns the created PartyGroup object
163
+ */
164
+ export interface CreateOrgResponse {
165
+ /** Organization ID */
166
+ id: string;
167
+ /** Party ID */
168
+ partyId: string;
169
+ /** Code ID */
170
+ codeId: string;
171
+ /** Group name */
172
+ groupName: string;
173
+ /** Group type */
174
+ groupType: string;
175
+ /** Short name */
176
+ shortName: string;
177
+ /** Group name local */
178
+ groupNameLocal: string;
179
+ /** Office site name */
180
+ officeSiteName: string;
181
+ /** Comments */
182
+ comments: string;
183
+ /** Logo image URL */
184
+ logoImageUrl: string;
185
+ /** Is incorporated */
186
+ isIncorporated: boolean;
187
+ /** Federal tax ID */
188
+ federalTaxId: string;
189
+ /** Description */
190
+ description: string;
191
+ /** Deleted flag */
192
+ deleted: boolean;
193
+ /** Status */
194
+ status: string;
195
+ /** Position index ID */
196
+ positionIndexId: string;
197
+ /** Prefix */
198
+ prefix: string;
199
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [