@medusajs/types 1.12.0-preview-20240522060542 → 1.12.0-preview-20240522090522

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,11 +2,11 @@ import { BaseFilterable } from "../../dal";
2
2
  /**
3
3
  * @interface
4
4
  *
5
- * The auth user details.
5
+ * The auth identity details.
6
6
  */
7
- export type AuthUserDTO = {
7
+ export type AuthIdentityDTO = {
8
8
  /**
9
- * The ID of the auth user.
9
+ * The ID of the auth identity.
10
10
  */
11
11
  id: string;
12
12
  /**
@@ -19,7 +19,7 @@ export type AuthUserDTO = {
19
19
  */
20
20
  entity_id: string;
21
21
  /**
22
- * The scope of the auth user. For example,
22
+ * The scope of the auth identity. For example,
23
23
  * `admin` or `store`.
24
24
  */
25
25
  scope: string;
@@ -39,11 +39,11 @@ export type AuthUserDTO = {
39
39
  /**
40
40
  * @interface
41
41
  *
42
- * The auth user to be created.
42
+ * The auth identity to be created.
43
43
  */
44
- export type CreateAuthUserDTO = {
44
+ export type CreateAuthIdentityDTO = {
45
45
  /**
46
- * The ID of the auth user.
46
+ * The ID of the auth identity.
47
47
  */
48
48
  id?: string;
49
49
  /**
@@ -57,7 +57,7 @@ export type CreateAuthUserDTO = {
57
57
  */
58
58
  entity_id: string;
59
59
  /**
60
- * The scope of the auth user. For example,
60
+ * The scope of the auth identity. For example,
61
61
  * `admin` or `store`.
62
62
  */
63
63
  scope: string;
@@ -77,11 +77,11 @@ export type CreateAuthUserDTO = {
77
77
  /**
78
78
  * @interface
79
79
  *
80
- * The attributes to update in the auth user.
80
+ * The attributes to update in the auth identity.
81
81
  */
82
- export type UpdateAuthUserDTO = {
82
+ export type UpdateAuthIdentityDTO = {
83
83
  /**
84
- * The ID of the auth user.
84
+ * The ID of the auth identity.
85
85
  */
86
86
  id: string;
87
87
  /**
@@ -98,16 +98,16 @@ export type UpdateAuthUserDTO = {
98
98
  app_metadata?: Record<string, unknown>;
99
99
  };
100
100
  /**
101
- * The filters to apply on the retrieved auth user.
101
+ * The filters to apply on the retrieved auth identity.
102
102
  */
103
- export interface FilterableAuthUserProps extends BaseFilterable<FilterableAuthUserProps> {
103
+ export interface FilterableAuthIdentityProps extends BaseFilterable<FilterableAuthIdentityProps> {
104
104
  /**
105
- * The IDs to filter the auth user by.
105
+ * The IDs to filter the auth identity by.
106
106
  */
107
107
  id?: string[];
108
108
  /**
109
- * Filter the auth users by the ID of their auth provider.
109
+ * Filter the auth identitys by the ID of their auth provider.
110
110
  */
111
111
  provider?: string[] | string;
112
112
  }
113
- //# sourceMappingURL=auth-user.d.ts.map
113
+ //# sourceMappingURL=auth-identity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-identity.d.ts","sourceRoot":"","sources":["../../../src/auth/common/auth-identity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAE1C;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IAEV;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAEhB;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAA;IAEjB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAE3C;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAEtC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACtC,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IAEX;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAA;IAEhB;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAA;IAEjB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAE3C;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAEvC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACvC,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IAEV;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAE3C;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAEvC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACvC,CAAA;AAED;;GAEG;AACH,MAAM,WAAW,2BACf,SAAQ,cAAc,CAAC,2BAA2B,CAAC;IACnD;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,EAAE,CAAA;IAEb;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAA;CAC7B"}
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=auth-user.js.map
3
+ //# sourceMappingURL=auth-identity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-identity.js","sourceRoot":"","sources":["../../../src/auth/common/auth-identity.ts"],"names":[],"mappings":""}
@@ -1,3 +1,3 @@
1
- export * from "./auth-user";
1
+ export * from "./auth-identity";
2
2
  export * from "./provider";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/auth/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/auth/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA"}
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./auth-user"), exports);
17
+ __exportStar(require("./auth-identity"), exports);
18
18
  __exportStar(require("./provider"), exports);
19
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/auth/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B;AAC3B,6CAA0B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/auth/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA+B;AAC/B,6CAA0B"}
@@ -11,7 +11,7 @@ export type AuthenticationResponse = {
11
11
  /**
12
12
  * The authenticated user's details.
13
13
  */
14
- authUser?: any;
14
+ authIdentity?: any;
15
15
  /**
16
16
  * If an error occurs during the authentication process,
17
17
  * whether within the Auth Module or a third-party provider,
@@ -1 +1 @@
1
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../src/auth/common/provider.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAA;IAEhB;;OAEG;IACH,QAAQ,CAAC,EAAE,GAAG,CAAA;IAEd;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB;;;;;;OAMG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B,CAAA;AAED;;;;;GAKG;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AAED;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAEvD;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IAEX;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAE/B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAE7B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAE5B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IAEjB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA"}
@@ -1,4 +1,4 @@
1
- import { AuthUserDTO, AuthenticationInput, AuthenticationResponse, CreateAuthUserDTO, FilterableAuthUserProps, UpdateAuthUserDTO } from "./common";
1
+ import { AuthIdentityDTO, AuthenticationInput, AuthenticationResponse, CreateAuthIdentityDTO, FilterableAuthIdentityProps, UpdateAuthIdentityDTO } from "./common";
2
2
  import { Context } from "../shared-context";
3
3
  import { FindConfig } from "../common";
4
4
  import { IModuleService } from "../modules-sdk";
@@ -28,7 +28,7 @@ export interface IAuthModuleService extends IModuleService {
28
28
  * `req` is an instance of the `MedusaRequest` object:
29
29
  *
30
30
  * ```ts
31
- * const { success, authUser, location, error } =
31
+ * const { success, authIdentity, location, error } =
32
32
  * await authModuleService.authenticate("emailpass", {
33
33
  * url: req.url,
34
34
  * headers: req.headers,
@@ -62,7 +62,7 @@ export interface IAuthModuleService extends IModuleService {
62
62
  * `req` is an instance of the `MedusaRequest` object:
63
63
  *
64
64
  * ```ts
65
- * const { success, authUser, error, successRedirectUrl } =
65
+ * const { success, authIdentity, error, successRedirectUrl } =
66
66
  * await authModuleService.validateCallback("google", {
67
67
  * url: req.url,
68
68
  * headers: req.headers,
@@ -76,32 +76,32 @@ export interface IAuthModuleService extends IModuleService {
76
76
  */
77
77
  validateCallback(provider: string, providerData: AuthenticationInput): Promise<AuthenticationResponse>;
78
78
  /**
79
- * This method retrieves an auth user by its ID.
79
+ * This method retrieves an auth identity by its ID.
80
80
  *
81
- * @param {string} id - The ID of the auth user.
82
- * @param {FindConfig<AuthUserDTO>} config - The configurations determining how the auth user is retrieved. Its properties, such as `select` or `relations`, accept the
83
- * attributes or relations associated with a auth user.
81
+ * @param {string} id - The ID of the auth identity.
82
+ * @param {FindConfig<AuthIdentityDTO>} config - The configurations determining how the auth identity is retrieved. Its properties, such as `select` or `relations`, accept the
83
+ * attributes or relations associated with a auth identity.
84
84
  * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
85
- * @returns {Promise<AuthUserDTO>} The retrieved auth user.
85
+ * @returns {Promise<AuthIdentityDTO>} The retrieved auth identity.
86
86
  *
87
87
  * @example
88
- * const authUser = await authModuleService.retrieve("authusr_1")
88
+ * const authIdentity = await authModuleService.retrieve("authusr_1")
89
89
  */
90
- retrieve(id: string, config?: FindConfig<AuthUserDTO>, sharedContext?: Context): Promise<AuthUserDTO>;
90
+ retrieve(id: string, config?: FindConfig<AuthIdentityDTO>, sharedContext?: Context): Promise<AuthIdentityDTO>;
91
91
  /**
92
- * This method retrieves a paginated list of auth users based on optional filters and configuration.
92
+ * This method retrieves a paginated list of auth identitys based on optional filters and configuration.
93
93
  *
94
- * @param {FilterableAuthUserProps} filters - The filters to apply on the retrieved auth users.
95
- * @param {FindConfig<AuthUserDTO>} config - The configurations determining how the auth user is retrieved. Its properties, such as `select` or `relations`, accept the
96
- * attributes or relations associated with a auth user.
94
+ * @param {FilterableAuthIdentityProps} filters - The filters to apply on the retrieved auth identitys.
95
+ * @param {FindConfig<AuthIdentityDTO>} config - The configurations determining how the auth identity is retrieved. Its properties, such as `select` or `relations`, accept the
96
+ * attributes or relations associated with a auth identity.
97
97
  * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
98
- * @returns {Promise<AuthUserDTO[]>} The list of auth users.
98
+ * @returns {Promise<AuthIdentityDTO[]>} The list of auth identitys.
99
99
  *
100
100
  * @example
101
- * To retrieve a list of auth users using their IDs:
101
+ * To retrieve a list of auth identitys using their IDs:
102
102
  *
103
103
  * ```ts
104
- * const authUsers = await authModuleService.list({
104
+ * const authIdentities = await authModuleService.list({
105
105
  * id: ["authusr_123", "authusr_321"],
106
106
  * })
107
107
  * ```
@@ -109,7 +109,7 @@ export interface IAuthModuleService extends IModuleService {
109
109
  * By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
110
110
  *
111
111
  * ```ts
112
- * const authUsers = await authModuleService.list(
112
+ * const authIdentities = await authModuleService.list(
113
113
  * {
114
114
  * id: ["authusr_123", "authusr_321"],
115
115
  * },
@@ -120,21 +120,21 @@ export interface IAuthModuleService extends IModuleService {
120
120
  * )
121
121
  * ```
122
122
  */
123
- list(filters?: FilterableAuthUserProps, config?: FindConfig<AuthUserDTO>, sharedContext?: Context): Promise<AuthUserDTO[]>;
123
+ list(filters?: FilterableAuthIdentityProps, config?: FindConfig<AuthIdentityDTO>, sharedContext?: Context): Promise<AuthIdentityDTO[]>;
124
124
  /**
125
- * This method retrieves a paginated list of auth users along with the total count of available auth users satisfying the provided filters.
125
+ * This method retrieves a paginated list of auth identitys along with the total count of available auth identitys satisfying the provided filters.
126
126
  *
127
- * @param {FilterableAuthUserProps} filters - The filters to apply on the retrieved auth users.
128
- * @param {FindConfig<AuthUserDTO>} config - The configurations determining how the auth user is retrieved. Its properties, such as `select` or `relations`, accept the
129
- * attributes or relations associated with a auth user.
127
+ * @param {FilterableAuthIdentityProps} filters - The filters to apply on the retrieved auth identitys.
128
+ * @param {FindConfig<AuthIdentityDTO>} config - The configurations determining how the auth identity is retrieved. Its properties, such as `select` or `relations`, accept the
129
+ * attributes or relations associated with a auth identity.
130
130
  * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
131
- * @returns {Promise<[AuthUserDTO[], number]>} The list of auth users along with their total count.
131
+ * @returns {Promise<[AuthIdentityDTO[], number]>} The list of auth identitys along with their total count.
132
132
  *
133
133
  * @example
134
- * To retrieve a list of auth users using their IDs:
134
+ * To retrieve a list of auth identitys using their IDs:
135
135
  *
136
136
  * ```ts
137
- * const [authUsers, count] =
137
+ * const [authIdentities, count] =
138
138
  * await authModuleService.listAndCount({
139
139
  * id: ["authusr_123", "authusr_321"],
140
140
  * })
@@ -143,7 +143,7 @@ export interface IAuthModuleService extends IModuleService {
143
143
  * By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
144
144
  *
145
145
  * ```ts
146
- * const [authUsers, count] =
146
+ * const [authIdentities, count] =
147
147
  * await authModuleService.listAndCount(
148
148
  * {
149
149
  * id: ["authusr_123", "authusr_321"],
@@ -155,16 +155,16 @@ export interface IAuthModuleService extends IModuleService {
155
155
  * )
156
156
  * ```
157
157
  */
158
- listAndCount(filters?: FilterableAuthUserProps, config?: FindConfig<AuthUserDTO>, sharedContext?: Context): Promise<[AuthUserDTO[], number]>;
158
+ listAndCount(filters?: FilterableAuthIdentityProps, config?: FindConfig<AuthIdentityDTO>, sharedContext?: Context): Promise<[AuthIdentityDTO[], number]>;
159
159
  /**
160
- * This method creates auth users.
160
+ * This method creates auth identitys.
161
161
  *
162
- * @param {CreateAuthUserDTO[]} data - The auth users to be created.
162
+ * @param {CreateAuthIdentityDTO[]} data - The auth identitys to be created.
163
163
  * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
164
- * @returns {Promise<AuthUserDTO[]>} The created auth users.
164
+ * @returns {Promise<AuthIdentityDTO[]>} The created auth identitys.
165
165
  *
166
166
  * @example
167
- * const authUsers = await authModuleService.create([
167
+ * const authIdentities = await authModuleService.create([
168
168
  * {
169
169
  * provider: "emailpass",
170
170
  * entity_id: "user@example.com",
@@ -177,31 +177,31 @@ export interface IAuthModuleService extends IModuleService {
177
177
  * },
178
178
  * ])
179
179
  */
180
- create(data: CreateAuthUserDTO[], sharedContext?: Context): Promise<AuthUserDTO[]>;
180
+ create(data: CreateAuthIdentityDTO[], sharedContext?: Context): Promise<AuthIdentityDTO[]>;
181
181
  /**
182
- * This method creates an auth user.
182
+ * This method creates an auth identity.
183
183
  *
184
- * @param {CreateAuthUserDTO} data - The auth user to be created.
184
+ * @param {CreateAuthIdentityDTO} data - The auth identity to be created.
185
185
  * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
186
- * @returns {Promise<AuthUserDTO>} The created auth user.
186
+ * @returns {Promise<AuthIdentityDTO>} The created auth identity.
187
187
  *
188
188
  * @example
189
- * const authUser = await authModuleService.create({
189
+ * const authIdentity = await authModuleService.create({
190
190
  * provider: "emailpass",
191
191
  * entity_id: "user@example.com",
192
192
  * scope: "admin",
193
193
  * })
194
194
  */
195
- create(data: CreateAuthUserDTO, sharedContext?: Context): Promise<AuthUserDTO>;
195
+ create(data: CreateAuthIdentityDTO, sharedContext?: Context): Promise<AuthIdentityDTO>;
196
196
  /**
197
197
  * This method updates existing auths.
198
198
  *
199
- * @param {UpdateAuthUserDTO[]} data - The attributes to update in the auth users.
199
+ * @param {UpdateAuthIdentityDTO[]} data - The attributes to update in the auth identitys.
200
200
  * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
201
- * @returns {Promise<AuthUserDTO[]>} The updated auths.
201
+ * @returns {Promise<AuthIdentityDTO[]>} The updated auths.
202
202
  *
203
203
  * @example
204
- * const authUsers = await authModuleService.update([
204
+ * const authIdentities = await authModuleService.update([
205
205
  * {
206
206
  * id: "authusr_123",
207
207
  * app_metadata: {
@@ -210,23 +210,23 @@ export interface IAuthModuleService extends IModuleService {
210
210
  * },
211
211
  * ])
212
212
  */
213
- update(data: UpdateAuthUserDTO[], sharedContext?: Context): Promise<AuthUserDTO[]>;
213
+ update(data: UpdateAuthIdentityDTO[], sharedContext?: Context): Promise<AuthIdentityDTO[]>;
214
214
  /**
215
215
  * This method updates an existing auth.
216
216
  *
217
- * @param {UpdateAuthUserDTO} data - The attributes to update in the auth user.
217
+ * @param {UpdateAuthIdentityDTO} data - The attributes to update in the auth identity.
218
218
  * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
219
- * @returns {Promise<AuthUserDTO>} The updated auth.
219
+ * @returns {Promise<AuthIdentityDTO>} The updated auth.
220
220
  *
221
221
  * @example
222
- * const authUser = await authModuleService.update({
222
+ * const authIdentity = await authModuleService.update({
223
223
  * id: "authusr_123",
224
224
  * app_metadata: {
225
225
  * test: true,
226
226
  * },
227
227
  * })
228
228
  */
229
- update(data: UpdateAuthUserDTO, sharedContext?: Context): Promise<AuthUserDTO>;
229
+ update(data: UpdateAuthIdentityDTO, sharedContext?: Context): Promise<AuthIdentityDTO>;
230
230
  /**
231
231
  * This method deletes a auth by its ID.
232
232
  *
@@ -1 +1 @@
1
- {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/auth/service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,mBAAmB,EACnB,sBAAsB,EACtB,iBAAiB,EACjB,uBAAuB,EACvB,iBAAiB,EAClB,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE/C;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAC5B,CAAA;AAED;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,cAAc;IACxD;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,YAAY,CACV,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,mBAAmB,GAChC,OAAO,CAAC,sBAAsB,CAAC,CAAA;IAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;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,IAAI,CACF,OAAO,CAAC,EAAE,2BAA2B,EACrC,MAAM,CAAC,EAAE,UAAU,CAAC,eAAe,CAAC,EACpC,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,eAAe,EAAE,CAAC,CAAA;IAE7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,YAAY,CACV,OAAO,CAAC,EAAE,2BAA2B,EACrC,MAAM,CAAC,EAAE,UAAU,CAAC,eAAe,CAAC,EACpC,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,CAAC,eAAe,EAAE,EAAE,MAAM,CAAC,CAAC,CAAA;IAEvC;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,CACJ,IAAI,EAAE,qBAAqB,EAAE,EAC7B,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,eAAe,EAAE,CAAC,CAAA;IAE7B;;;;;;;;;;;;;OAaG;IACH,MAAM,CACJ,IAAI,EAAE,qBAAqB,EAC3B,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,eAAe,CAAC,CAAA;IAE3B;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CACJ,IAAI,EAAE,qBAAqB,EAAE,EAC7B,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,eAAe,EAAE,CAAC,CAAA;IAE7B;;;;;;;;;;;;;;OAcG;IACH,MAAM,CACJ,IAAI,EAAE,qBAAqB,EAC3B,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,eAAe,CAAC,CAAA;IAE3B;;;;;;;;;OASG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,aAAa,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAC9D"}
@@ -1,6 +1,6 @@
1
1
  export interface AcceptInviteWorkflowInputDTO {
2
2
  invite_token: string;
3
- auth_user_id: string;
3
+ auth_identity_id: string;
4
4
  user: {
5
5
  email?: string;
6
6
  first_name?: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"accept-invite.d.ts","sourceRoot":"","sources":["../../../src/workflow/invite/accept-invite.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,4BAA4B;IAC3C,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;IACpB,IAAI,EAAE;QACJ,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;QAC1B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;QACzB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;QAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;KAC1C,CAAA;CACF"}
1
+ {"version":3,"file":"accept-invite.d.ts","sourceRoot":"","sources":["../../../src/workflow/invite/accept-invite.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,4BAA4B;IAC3C,YAAY,EAAE,MAAM,CAAA;IACpB,gBAAgB,EAAE,MAAM,CAAA;IACxB,IAAI,EAAE;QACJ,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;QAC1B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;QACzB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;QAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;KAC1C,CAAA;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/types",
3
- "version": "1.12.0-preview-20240522060542",
3
+ "version": "1.12.0-preview-20240522090522",
4
4
  "description": "Medusa Types definition",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth-user.d.ts","sourceRoot":"","sources":["../../../src/au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