@accounter/server 0.0.8-alpha-20251028124234-328844c99a42b68aa9e2f32fd86da80b4832f631 → 0.0.8-alpha-20251028215142-58f2a3b66bb50de659a3b7d03ea774d2dabdc039
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/CHANGELOG.md +96 -4
- package/dist/server/src/__generated__/types.d.ts +28 -20
- package/dist/server/src/__generated__/types.js.map +1 -1
- package/dist/server/src/modules/contracts/__generated__/contracts.types.d.ts +16 -2
- package/dist/server/src/modules/contracts/__generated__/types.d.ts +5 -4
- package/dist/server/src/modules/contracts/__generated__/types.js.map +1 -1
- package/dist/server/src/modules/contracts/providers/contracts.provider.js +13 -7
- package/dist/server/src/modules/contracts/providers/contracts.provider.js.map +1 -1
- package/dist/server/src/modules/contracts/resolvers/contracts.resolver.js +6 -3
- package/dist/server/src/modules/contracts/resolvers/contracts.resolver.js.map +1 -1
- package/dist/server/src/modules/contracts/typeDefs/contracts.graphql.js +6 -3
- package/dist/server/src/modules/contracts/typeDefs/contracts.graphql.js.map +1 -1
- package/dist/server/src/modules/financial-entities/__generated__/types.d.ts +8 -7
- package/dist/server/src/modules/financial-entities/__generated__/types.js.map +1 -1
- package/dist/server/src/modules/financial-entities/resolvers/admin-businesses.resolver.js +5 -4
- package/dist/server/src/modules/financial-entities/resolvers/admin-businesses.resolver.js.map +1 -1
- package/dist/server/src/modules/financial-entities/typeDefs/admin-businesses.graphql.js +15 -12
- package/dist/server/src/modules/financial-entities/typeDefs/admin-businesses.graphql.js.map +1 -1
- package/dist/server/src/modules/green-invoice/resolvers/green-invoice.resolvers.js +2 -2
- package/dist/server/src/modules/green-invoice/resolvers/green-invoice.resolvers.js.map +1 -1
- package/package.json +5 -5
- package/src/__generated__/types.ts +28 -20
- package/src/modules/contracts/__generated__/contracts.types.ts +18 -2
- package/src/modules/contracts/__generated__/types.ts +5 -4
- package/src/modules/contracts/providers/contracts.provider.ts +13 -7
- package/src/modules/contracts/resolvers/contracts.resolver.ts +6 -3
- package/src/modules/contracts/typeDefs/contracts.graphql.ts +6 -3
- package/src/modules/financial-entities/__generated__/types.ts +8 -7
- package/src/modules/financial-entities/resolvers/admin-businesses.resolver.ts +5 -4
- package/src/modules/financial-entities/typeDefs/admin-businesses.graphql.ts +15 -12
- package/src/modules/green-invoice/resolvers/green-invoice.resolvers.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @accounter/server
|
|
2
2
|
|
|
3
|
-
## 0.0.8-alpha-
|
|
3
|
+
## 0.0.8-alpha-20251028215142-58f2a3b66bb50de659a3b7d03ea774d2dabdc039
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
@@ -152,6 +152,17 @@
|
|
|
152
152
|
- Updated dependency [`puppeteer@24.26.0` ↗︎](https://www.npmjs.com/package/puppeteer/v/24.26.0)
|
|
153
153
|
(from `24.25.0`, in `dependencies`)
|
|
154
154
|
|
|
155
|
+
- [#2612](https://github.com/Urigo/accounter-fullstack/pull/2612)
|
|
156
|
+
[`232f7c2`](https://github.com/Urigo/accounter-fullstack/commit/232f7c2276aad578000ff99f264ea0b978079906)
|
|
157
|
+
Thanks [@renovate](https://github.com/apps/renovate)! - dependencies updates:
|
|
158
|
+
- Updated dependency
|
|
159
|
+
[`@ai-sdk/anthropic@2.0.38` ↗︎](https://www.npmjs.com/package/@ai-sdk/anthropic/v/2.0.38) (from
|
|
160
|
+
`2.0.35`, in `dependencies`)
|
|
161
|
+
- Updated dependency [`ai@5.0.81` ↗︎](https://www.npmjs.com/package/ai/v/5.0.81) (from `5.0.76`,
|
|
162
|
+
in `dependencies`)
|
|
163
|
+
- Updated dependency [`puppeteer@24.26.1` ↗︎](https://www.npmjs.com/package/puppeteer/v/24.26.1)
|
|
164
|
+
(from `24.26.0`, in `dependencies`)
|
|
165
|
+
|
|
155
166
|
- [#2618](https://github.com/Urigo/accounter-fullstack/pull/2618)
|
|
156
167
|
[`5d24324`](https://github.com/Urigo/accounter-fullstack/commit/5d24324d9f5ba6e5875a331afe55d999e510451f)
|
|
157
168
|
Thanks [@gilgardosh](https://github.com/gilgardosh)! - dependencies updates:
|
|
@@ -168,6 +179,51 @@
|
|
|
168
179
|
- Updated dependency [`puppeteer@24.26.0` ↗︎](https://www.npmjs.com/package/puppeteer/v/24.26.0)
|
|
169
180
|
(from `24.25.0`, in `dependencies`)
|
|
170
181
|
|
|
182
|
+
- [#2626](https://github.com/Urigo/accounter-fullstack/pull/2626)
|
|
183
|
+
[`b2049c0`](https://github.com/Urigo/accounter-fullstack/commit/b2049c0a242afb4dc1f63366a6e4611050b3c7c0)
|
|
184
|
+
Thanks [@gilgardosh](https://github.com/gilgardosh)! - dependencies updates:
|
|
185
|
+
- Updated dependency
|
|
186
|
+
[`@ai-sdk/anthropic@2.0.38` ↗︎](https://www.npmjs.com/package/@ai-sdk/anthropic/v/2.0.38) (from
|
|
187
|
+
`2.0.35`, in `dependencies`)
|
|
188
|
+
- Updated dependency [`ai@5.0.81` ↗︎](https://www.npmjs.com/package/ai/v/5.0.81) (from `5.0.76`,
|
|
189
|
+
in `dependencies`)
|
|
190
|
+
- Updated dependency [`puppeteer@24.26.1` ↗︎](https://www.npmjs.com/package/puppeteer/v/24.26.1)
|
|
191
|
+
(from `24.26.0`, in `dependencies`)
|
|
192
|
+
|
|
193
|
+
- [#2629](https://github.com/Urigo/accounter-fullstack/pull/2629)
|
|
194
|
+
[`6244c1b`](https://github.com/Urigo/accounter-fullstack/commit/6244c1bbafa7029f426bdaf796d830ff62cee006)
|
|
195
|
+
Thanks [@gilgardosh](https://github.com/gilgardosh)! - dependencies updates:
|
|
196
|
+
- Updated dependency
|
|
197
|
+
[`@ai-sdk/anthropic@2.0.38` ↗︎](https://www.npmjs.com/package/@ai-sdk/anthropic/v/2.0.38) (from
|
|
198
|
+
`2.0.35`, in `dependencies`)
|
|
199
|
+
- Updated dependency [`ai@5.0.81` ↗︎](https://www.npmjs.com/package/ai/v/5.0.81) (from `5.0.76`,
|
|
200
|
+
in `dependencies`)
|
|
201
|
+
- Updated dependency [`puppeteer@24.26.1` ↗︎](https://www.npmjs.com/package/puppeteer/v/24.26.1)
|
|
202
|
+
(from `24.26.0`, in `dependencies`)
|
|
203
|
+
|
|
204
|
+
- [#2634](https://github.com/Urigo/accounter-fullstack/pull/2634)
|
|
205
|
+
[`b05ab20`](https://github.com/Urigo/accounter-fullstack/commit/b05ab20692349fbc7b74f36d9f0f19c02f5ba9a3)
|
|
206
|
+
Thanks [@gilgardosh](https://github.com/gilgardosh)! - dependencies updates:
|
|
207
|
+
- Updated dependency
|
|
208
|
+
[`@ai-sdk/anthropic@2.0.38` ↗︎](https://www.npmjs.com/package/@ai-sdk/anthropic/v/2.0.38) (from
|
|
209
|
+
`2.0.35`, in `dependencies`)
|
|
210
|
+
- Updated dependency [`ai@5.0.81` ↗︎](https://www.npmjs.com/package/ai/v/5.0.81) (from `5.0.76`,
|
|
211
|
+
in `dependencies`)
|
|
212
|
+
- Updated dependency [`puppeteer@24.26.1` ↗︎](https://www.npmjs.com/package/puppeteer/v/24.26.1)
|
|
213
|
+
(from `24.26.0`, in `dependencies`)
|
|
214
|
+
|
|
215
|
+
- [#2631](https://github.com/Urigo/accounter-fullstack/pull/2631)
|
|
216
|
+
[`86c8b3e`](https://github.com/Urigo/accounter-fullstack/commit/86c8b3ebea4e3be0c0e99a108ec1cdad8b39e5d8)
|
|
217
|
+
Thanks [@gilgardosh](https://github.com/gilgardosh)! - - **Database Schema Update**: A new
|
|
218
|
+
"operations_count" column has been added to the "clients_contracts" table to store the operational
|
|
219
|
+
limit for each contract.
|
|
220
|
+
- **GraphQL API Extension**: The GraphQL schema, resolvers, and database providers have been
|
|
221
|
+
updated to support the "operationsLimit" field for creating, updating, and querying contract
|
|
222
|
+
data.
|
|
223
|
+
- **User Interface Integration**: The client application now includes a dedicated input field for
|
|
224
|
+
setting the "operationsLimit" in the contract modification dialog and displays this value in the
|
|
225
|
+
contract details section.
|
|
226
|
+
|
|
171
227
|
- [#2551](https://github.com/Urigo/accounter-fullstack/pull/2551)
|
|
172
228
|
[`14900d1`](https://github.com/Urigo/accounter-fullstack/commit/14900d10209272429118ff4bd2e52893c813170b)
|
|
173
229
|
Thanks [@gilgardosh](https://github.com/gilgardosh)! - - **Error Handling Standardization**: The
|
|
@@ -191,6 +247,25 @@
|
|
|
191
247
|
retrieved 'adminContext.locality' instead of a hardcoded country name, improving flexibility and
|
|
192
248
|
accuracy.
|
|
193
249
|
|
|
250
|
+
- [#2629](https://github.com/Urigo/accounter-fullstack/pull/2629)
|
|
251
|
+
[`6244c1b`](https://github.com/Urigo/accounter-fullstack/commit/6244c1bbafa7029f426bdaf796d830ff62cee006)
|
|
252
|
+
Thanks [@gilgardosh](https://github.com/gilgardosh)! - - **Database Schema Update**: The
|
|
253
|
+
`clients_contracts` table in the database has been updated to replace the single `purchase_order`
|
|
254
|
+
column (string) with a new `purchase_orders` column, which is an array of text (`text[]`),
|
|
255
|
+
allowing multiple POs per contract.
|
|
256
|
+
- **GraphQL API Evolution**: The GraphQL schema has been modified to reflect this change, updating
|
|
257
|
+
`purchaseOrder: String` to `purchaseOrders: [String!]!` across the `Contract` type,
|
|
258
|
+
`CreateContractInput`, and `UpdateContractInput`.
|
|
259
|
+
- **Frontend User Interface**: The client-side application now supports displaying and managing
|
|
260
|
+
multiple Purchase Orders. Users can add new POs, view all associated POs (with the latest one
|
|
261
|
+
highlighted), and remove POs directly from the contract modification dialog.
|
|
262
|
+
- **Backend Logic Adaptation**: Server-side resolvers and database providers have been updated to
|
|
263
|
+
correctly handle the new `purchase_orders` array when creating, updating, and querying
|
|
264
|
+
contracts.
|
|
265
|
+
- **Green Invoice Integration**: The integration with Green Invoice has been adjusted to use the
|
|
266
|
+
first Purchase Order from the `purchase_orders` array when generating document remarks, ensuring
|
|
267
|
+
compatibility with external systems that might expect a single PO reference.
|
|
268
|
+
|
|
194
269
|
- [#2513](https://github.com/Urigo/accounter-fullstack/pull/2513)
|
|
195
270
|
[`a2308dc`](https://github.com/Urigo/accounter-fullstack/commit/a2308dc812562b22f290bdd2e638c676fad77ac8)
|
|
196
271
|
Thanks [@gilgardosh](https://github.com/gilgardosh)! - - **Gmail Listener Implementation**:
|
|
@@ -242,6 +317,23 @@
|
|
|
242
317
|
* `packages/server/src/modules/transactions/resolvers/transaction-suggestions.resolver.ts`:
|
|
243
318
|
Updated import path for `suggestionDataSchema`.
|
|
244
319
|
|
|
320
|
+
- [#2626](https://github.com/Urigo/accounter-fullstack/pull/2626)
|
|
321
|
+
[`b2049c0`](https://github.com/Urigo/accounter-fullstack/commit/b2049c0a242afb4dc1f63366a6e4611050b3c7c0)
|
|
322
|
+
Thanks [@gilgardosh](https://github.com/gilgardosh)! - - **Client Creation Flow Enhancement**: The
|
|
323
|
+
"Create New Business" dialog now includes an option to immediately create a client associated with
|
|
324
|
+
the new business. If selected, a `ModifyClientDialog` will automatically open after business
|
|
325
|
+
creation, streamlining the onboarding process.
|
|
326
|
+
- **`ModifyClientDialog` Flexibility**: The `ModifyClientDialog` component has been enhanced with
|
|
327
|
+
a `showTrigger` prop, allowing it to be rendered without its default trigger button, making it
|
|
328
|
+
suitable for programmatic opening. It also now consistently calls the `onDone` callback when
|
|
329
|
+
closed, improving callback reliability.
|
|
330
|
+
- **User Navigation Improvements**: The user dropdown menu now displays the actual logged-in
|
|
331
|
+
username from the `UserContext` and includes a direct link to the "Admin Configurations" page
|
|
332
|
+
for the user's primary business, providing quicker access to administrative settings.
|
|
333
|
+
- **Form Schema Refinements**: The business creation form schema has been updated to use more
|
|
334
|
+
direct Zod validators (`z.email()`, `z.url()`) for better type safety and includes a new
|
|
335
|
+
`isClient` boolean field to indicate if the business is also a client.
|
|
336
|
+
|
|
245
337
|
- [#2582](https://github.com/Urigo/accounter-fullstack/pull/2582)
|
|
246
338
|
[`32276b4`](https://github.com/Urigo/accounter-fullstack/commit/32276b47e164f0976fcdd5523fa5e26f0704014f)
|
|
247
339
|
Thanks [@gilgardosh](https://github.com/gilgardosh)! - - **New Business/Client Page**: Introduced
|
|
@@ -380,9 +472,9 @@
|
|
|
380
472
|
[[`65e3c7f`](https://github.com/Urigo/accounter-fullstack/commit/65e3c7f01993eb4f41244a40feefefa08b31a4e6),
|
|
381
473
|
[`65e3c7f`](https://github.com/Urigo/accounter-fullstack/commit/65e3c7f01993eb4f41244a40feefefa08b31a4e6),
|
|
382
474
|
[`65e3c7f`](https://github.com/Urigo/accounter-fullstack/commit/65e3c7f01993eb4f41244a40feefefa08b31a4e6)]:
|
|
383
|
-
- @accounter/pcn874-generator@0.6.3-alpha-
|
|
384
|
-
- @accounter/shaam-uniform-format-generator@0.2.2-alpha-
|
|
385
|
-
- @accounter/shaam6111-generator@0.1.4-alpha-
|
|
475
|
+
- @accounter/pcn874-generator@0.6.3-alpha-20251028215142-58f2a3b66bb50de659a3b7d03ea774d2dabdc039
|
|
476
|
+
- @accounter/shaam-uniform-format-generator@0.2.2-alpha-20251028215142-58f2a3b66bb50de659a3b7d03ea774d2dabdc039
|
|
477
|
+
- @accounter/shaam6111-generator@0.1.4-alpha-20251028215142-58f2a3b66bb50de659a3b7d03ea774d2dabdc039
|
|
386
478
|
|
|
387
479
|
## 0.0.7
|
|
388
480
|
|
|
@@ -188,15 +188,16 @@ export type AddBusinessTripTravelAndSubsistenceExpenseInput = {
|
|
|
188
188
|
/** Represents a business entity managed by an accountant in the system. */
|
|
189
189
|
export type AdminBusiness = {
|
|
190
190
|
readonly __typename?: 'AdminBusiness';
|
|
191
|
-
readonly advanceTaxRate?: Maybe<Scalars['Float']['output']>;
|
|
192
191
|
readonly business: LtdFinancialEntity;
|
|
193
|
-
readonly employerWithholdingTaxAccountNumber?: Maybe<Scalars['String']['output']>;
|
|
194
192
|
readonly governmentId: Scalars['String']['output'];
|
|
195
193
|
readonly id: Scalars['UUID']['output'];
|
|
196
194
|
readonly name: Scalars['String']['output'];
|
|
197
|
-
readonly nationalInsuranceEmployerId?: Maybe<Scalars['String']['output']>;
|
|
198
195
|
readonly registrationDate: Scalars['TimelessDate']['output'];
|
|
199
|
-
readonly
|
|
196
|
+
readonly socialSecurityEmployerId?: Maybe<Scalars['String']['output']>;
|
|
197
|
+
readonly taxAdvancesId?: Maybe<Scalars['String']['output']>;
|
|
198
|
+
readonly taxAdvancesRate?: Maybe<Scalars['Float']['output']>;
|
|
199
|
+
readonly withholdingTaxBookNumber?: Maybe<Scalars['String']['output']>;
|
|
200
|
+
readonly withholdingTaxFileNumber?: Maybe<Scalars['String']['output']>;
|
|
200
201
|
};
|
|
201
202
|
/** defines a tag / category for charge arrangement */
|
|
202
203
|
export type AdminContext = {
|
|
@@ -963,9 +964,10 @@ export type Contract = {
|
|
|
963
964
|
readonly id: Scalars['UUID']['output'];
|
|
964
965
|
readonly isActive: Scalars['Boolean']['output'];
|
|
965
966
|
readonly msCloud?: Maybe<Scalars['URL']['output']>;
|
|
967
|
+
readonly operationsLimit: Scalars['Int']['output'];
|
|
966
968
|
readonly plan?: Maybe<SubscriptionPlan>;
|
|
967
969
|
readonly product?: Maybe<Product>;
|
|
968
|
-
readonly
|
|
970
|
+
readonly purchaseOrders: ReadonlyArray<Scalars['String']['output']>;
|
|
969
971
|
readonly remarks?: Maybe<Scalars['String']['output']>;
|
|
970
972
|
readonly startDate: Scalars['TimelessDate']['output'];
|
|
971
973
|
};
|
|
@@ -1104,12 +1106,13 @@ export type Country = {
|
|
|
1104
1106
|
};
|
|
1105
1107
|
/** Input type for creating a new admin business. */
|
|
1106
1108
|
export type CreateAdminBusinessInput = {
|
|
1107
|
-
readonly advanceTaxRate?: InputMaybe<Scalars['Float']['input']>;
|
|
1108
1109
|
readonly businessId: Scalars['UUID']['input'];
|
|
1109
|
-
readonly employerWithholdingTaxAccountNumber?: InputMaybe<Scalars['String']['input']>;
|
|
1110
|
-
readonly nationalInsuranceEmployerId?: InputMaybe<Scalars['String']['input']>;
|
|
1111
1110
|
readonly registrationDate: Scalars['TimelessDate']['input'];
|
|
1112
|
-
readonly
|
|
1111
|
+
readonly socialSecurityEmployerId?: InputMaybe<Scalars['String']['input']>;
|
|
1112
|
+
readonly taxAdvancesId?: InputMaybe<Scalars['String']['input']>;
|
|
1113
|
+
readonly taxAdvancesRate?: InputMaybe<Scalars['Float']['input']>;
|
|
1114
|
+
readonly withholdingTaxBookNumber?: InputMaybe<Scalars['String']['input']>;
|
|
1115
|
+
readonly withholdingTaxFileNumber?: InputMaybe<Scalars['String']['input']>;
|
|
1113
1116
|
};
|
|
1114
1117
|
/** input for creating a new contract */
|
|
1115
1118
|
export type CreateContractInput = {
|
|
@@ -1120,9 +1123,10 @@ export type CreateContractInput = {
|
|
|
1120
1123
|
readonly endDate: Scalars['TimelessDate']['input'];
|
|
1121
1124
|
readonly isActive: Scalars['Boolean']['input'];
|
|
1122
1125
|
readonly msCloud?: InputMaybe<Scalars['URL']['input']>;
|
|
1126
|
+
readonly operationsLimit?: InputMaybe<Scalars['Int']['input']>;
|
|
1123
1127
|
readonly plan?: InputMaybe<SubscriptionPlan>;
|
|
1124
1128
|
readonly product?: InputMaybe<Product>;
|
|
1125
|
-
readonly
|
|
1129
|
+
readonly purchaseOrders: ReadonlyArray<Scalars['String']['input']>;
|
|
1126
1130
|
readonly remarks?: InputMaybe<Scalars['String']['input']>;
|
|
1127
1131
|
readonly startDate: Scalars['TimelessDate']['input'];
|
|
1128
1132
|
};
|
|
@@ -3641,11 +3645,12 @@ export type Unprocessed = Document & Linkable & {
|
|
|
3641
3645
|
};
|
|
3642
3646
|
/** Input type for updating admin business details. */
|
|
3643
3647
|
export type UpdateAdminBusinessInput = {
|
|
3644
|
-
readonly advanceTaxRate?: InputMaybe<Scalars['Float']['input']>;
|
|
3645
|
-
readonly employerWithholdingTaxAccountNumber?: InputMaybe<Scalars['String']['input']>;
|
|
3646
|
-
readonly nationalInsuranceEmployerId?: InputMaybe<Scalars['String']['input']>;
|
|
3647
3648
|
readonly registrationDate?: InputMaybe<Scalars['TimelessDate']['input']>;
|
|
3648
|
-
readonly
|
|
3649
|
+
readonly socialSecurityEmployerId?: InputMaybe<Scalars['String']['input']>;
|
|
3650
|
+
readonly taxAdvancesId?: InputMaybe<Scalars['String']['input']>;
|
|
3651
|
+
readonly taxAdvancesRate?: InputMaybe<Scalars['Float']['input']>;
|
|
3652
|
+
readonly withholdingTaxBookNumber?: InputMaybe<Scalars['String']['input']>;
|
|
3653
|
+
readonly withholdingTaxFileNumber?: InputMaybe<Scalars['String']['input']>;
|
|
3649
3654
|
};
|
|
3650
3655
|
/** input for updateBusiness */
|
|
3651
3656
|
export type UpdateBusinessInput = {
|
|
@@ -3772,9 +3777,10 @@ export type UpdateContractInput = {
|
|
|
3772
3777
|
readonly endDate?: InputMaybe<Scalars['TimelessDate']['input']>;
|
|
3773
3778
|
readonly isActive?: InputMaybe<Scalars['Boolean']['input']>;
|
|
3774
3779
|
readonly msCloud?: InputMaybe<Scalars['URL']['input']>;
|
|
3780
|
+
readonly operationsLimit?: InputMaybe<Scalars['Int']['input']>;
|
|
3775
3781
|
readonly plan?: InputMaybe<SubscriptionPlan>;
|
|
3776
3782
|
readonly product?: InputMaybe<Product>;
|
|
3777
|
-
readonly
|
|
3783
|
+
readonly purchaseOrders: ReadonlyArray<Scalars['String']['input']>;
|
|
3778
3784
|
readonly remarks?: InputMaybe<Scalars['String']['input']>;
|
|
3779
3785
|
readonly startDate?: InputMaybe<Scalars['TimelessDate']['input']>;
|
|
3780
3786
|
};
|
|
@@ -4773,15 +4779,16 @@ export type DeferDirectiveResolver<Result, Parent, ContextType = GraphQLModules.
|
|
|
4773
4779
|
export type StreamDirectiveArgs = {};
|
|
4774
4780
|
export type StreamDirectiveResolver<Result, Parent, ContextType = GraphQLModules.Context, Args = StreamDirectiveArgs> = DirectiveResolverFn<Result, Parent, ContextType, Args>;
|
|
4775
4781
|
export type AdminBusinessResolvers<ContextType = GraphQLModules.Context, ParentType extends ResolversParentTypes['AdminBusiness'] = ResolversParentTypes['AdminBusiness']> = {
|
|
4776
|
-
advanceTaxRate?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
|
|
4777
4782
|
business?: Resolver<ResolversTypes['LtdFinancialEntity'], ParentType, ContextType>;
|
|
4778
|
-
employerWithholdingTaxAccountNumber?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
4779
4783
|
governmentId?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
4780
4784
|
id?: Resolver<ResolversTypes['UUID'], ParentType, ContextType>;
|
|
4781
4785
|
name?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
4782
|
-
nationalInsuranceEmployerId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
4783
4786
|
registrationDate?: Resolver<ResolversTypes['TimelessDate'], ParentType, ContextType>;
|
|
4784
|
-
|
|
4787
|
+
socialSecurityEmployerId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
4788
|
+
taxAdvancesId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
4789
|
+
taxAdvancesRate?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
|
|
4790
|
+
withholdingTaxBookNumber?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
4791
|
+
withholdingTaxFileNumber?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
4785
4792
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
4786
4793
|
};
|
|
4787
4794
|
export type AdminContextResolvers<ContextType = GraphQLModules.Context, ParentType extends ResolversParentTypes['AdminContext'] = ResolversParentTypes['AdminContext']> = {
|
|
@@ -5282,9 +5289,10 @@ export type ContractResolvers<ContextType = GraphQLModules.Context, ParentType e
|
|
|
5282
5289
|
id?: Resolver<ResolversTypes['UUID'], ParentType, ContextType>;
|
|
5283
5290
|
isActive?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType>;
|
|
5284
5291
|
msCloud?: Resolver<Maybe<ResolversTypes['URL']>, ParentType, ContextType>;
|
|
5292
|
+
operationsLimit?: Resolver<ResolversTypes['Int'], ParentType, ContextType>;
|
|
5285
5293
|
plan?: Resolver<Maybe<ResolversTypes['SubscriptionPlan']>, ParentType, ContextType>;
|
|
5286
5294
|
product?: Resolver<Maybe<ResolversTypes['Product']>, ParentType, ContextType>;
|
|
5287
|
-
|
|
5295
|
+
purchaseOrders?: Resolver<ReadonlyArray<ResolversTypes['String']>, ParentType, ContextType>;
|
|
5288
5296
|
remarks?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
5289
5297
|
startDate?: Resolver<ResolversTypes['TimelessDate'], ParentType, ContextType>;
|
|
5290
5298
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/__generated__/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/__generated__/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAq2BrD,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAyX7B,OAAO,EAAE,QAAQ,EAAE,CAAC;AAuLpB,OAAO,EAAE,YAAY,EAAE,CAAC;AA2lCxB,OAAO,EAAE,iBAAiB,EAAE,CAAC;AA62D7B,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
export type currency = 'AUD' | 'CAD' | 'ETH' | 'EUR' | 'GBP' | 'GRT' | 'ILS' | 'JPY' | 'SEK' | 'USD' | 'USDC';
|
|
3
3
|
export type document_type = 'CREDIT_INVOICE' | 'INVOICE' | 'INVOICE_RECEIPT' | 'OTHER' | 'PROFORMA' | 'RECEIPT' | 'UNPROCESSED';
|
|
4
4
|
export type DateOrString = Date | string;
|
|
5
|
+
export type NumberOrString = number | string;
|
|
6
|
+
export type stringArray = (string)[];
|
|
5
7
|
/** 'GetAllOpenContracts' parameters type */
|
|
6
8
|
export type IGetAllOpenContractsParams = void;
|
|
7
9
|
/** 'GetAllOpenContracts' return type */
|
|
@@ -15,9 +17,11 @@ export interface IGetAllOpenContractsResult {
|
|
|
15
17
|
id: string;
|
|
16
18
|
is_active: boolean | null;
|
|
17
19
|
ms_cloud: string | null;
|
|
20
|
+
operations_count: string;
|
|
18
21
|
plan: string | null;
|
|
19
22
|
product: string | null;
|
|
20
23
|
purchase_order: string | null;
|
|
24
|
+
purchase_orders: stringArray;
|
|
21
25
|
remarks: string | null;
|
|
22
26
|
signed_agreement: string | null;
|
|
23
27
|
start_date: Date;
|
|
@@ -42,9 +46,11 @@ export interface IGetContractsByIdsResult {
|
|
|
42
46
|
id: string;
|
|
43
47
|
is_active: boolean | null;
|
|
44
48
|
ms_cloud: string | null;
|
|
49
|
+
operations_count: string;
|
|
45
50
|
plan: string | null;
|
|
46
51
|
product: string | null;
|
|
47
52
|
purchase_order: string | null;
|
|
53
|
+
purchase_orders: stringArray;
|
|
48
54
|
remarks: string | null;
|
|
49
55
|
signed_agreement: string | null;
|
|
50
56
|
start_date: Date;
|
|
@@ -69,9 +75,11 @@ export interface IGetContractsByClientIdsResult {
|
|
|
69
75
|
id: string;
|
|
70
76
|
is_active: boolean | null;
|
|
71
77
|
ms_cloud: string | null;
|
|
78
|
+
operations_count: string;
|
|
72
79
|
plan: string | null;
|
|
73
80
|
product: string | null;
|
|
74
81
|
purchase_order: string | null;
|
|
82
|
+
purchase_orders: stringArray;
|
|
75
83
|
remarks: string | null;
|
|
76
84
|
signed_agreement: string | null;
|
|
77
85
|
start_date: Date;
|
|
@@ -103,9 +111,10 @@ export interface IUpdateContractParams {
|
|
|
103
111
|
end_date?: DateOrString | null | void;
|
|
104
112
|
is_active?: boolean | null | void;
|
|
105
113
|
ms_cloud?: string | null | void;
|
|
114
|
+
operationsLimit?: NumberOrString | null | void;
|
|
106
115
|
plan?: string | null | void;
|
|
107
116
|
product?: string | null | void;
|
|
108
|
-
|
|
117
|
+
purchase_orders?: stringArray | null | void;
|
|
109
118
|
remarks?: string | null | void;
|
|
110
119
|
start_date?: DateOrString | null | void;
|
|
111
120
|
}
|
|
@@ -120,9 +129,11 @@ export interface IUpdateContractResult {
|
|
|
120
129
|
id: string;
|
|
121
130
|
is_active: boolean | null;
|
|
122
131
|
ms_cloud: string | null;
|
|
132
|
+
operations_count: string;
|
|
123
133
|
plan: string | null;
|
|
124
134
|
product: string | null;
|
|
125
135
|
purchase_order: string | null;
|
|
136
|
+
purchase_orders: stringArray;
|
|
126
137
|
remarks: string | null;
|
|
127
138
|
signed_agreement: string | null;
|
|
128
139
|
start_date: Date;
|
|
@@ -142,9 +153,10 @@ export interface IInsertContractParams {
|
|
|
142
153
|
endDate?: DateOrString | null | void;
|
|
143
154
|
isActive?: boolean | null | void;
|
|
144
155
|
msCloud?: string | null | void;
|
|
156
|
+
operationsLimit?: NumberOrString | null | void;
|
|
145
157
|
plan?: string | null | void;
|
|
146
158
|
product?: string | null | void;
|
|
147
|
-
|
|
159
|
+
purchaseOrders?: stringArray | null | void;
|
|
148
160
|
remarks?: string | null | void;
|
|
149
161
|
startDate?: DateOrString | null | void;
|
|
150
162
|
}
|
|
@@ -159,9 +171,11 @@ export interface IInsertContractResult {
|
|
|
159
171
|
id: string;
|
|
160
172
|
is_active: boolean | null;
|
|
161
173
|
ms_cloud: string | null;
|
|
174
|
+
operations_count: string;
|
|
162
175
|
plan: string | null;
|
|
163
176
|
product: string | null;
|
|
164
177
|
purchase_order: string | null;
|
|
178
|
+
purchase_orders: stringArray;
|
|
165
179
|
remarks: string | null;
|
|
166
180
|
signed_agreement: string | null;
|
|
167
181
|
start_date: Date;
|
|
@@ -4,7 +4,7 @@ export declare namespace ContractsModule {
|
|
|
4
4
|
interface DefinedFields {
|
|
5
5
|
Query: 'allOpenContracts' | 'contractsByClient';
|
|
6
6
|
Mutation: 'updateContract' | 'deleteContract' | 'createContract';
|
|
7
|
-
Contract: 'id' | 'client' | '
|
|
7
|
+
Contract: 'id' | 'client' | 'purchaseOrders' | 'startDate' | 'endDate' | 'remarks' | 'amount' | 'documentType' | 'billingCycle' | 'isActive' | 'product' | 'plan' | 'msCloud' | 'operationsLimit';
|
|
8
8
|
}
|
|
9
9
|
interface DefinedEnumValues {
|
|
10
10
|
BillingCycle: 'MONTHLY' | 'ANNUAL';
|
|
@@ -12,8 +12,8 @@ export declare namespace ContractsModule {
|
|
|
12
12
|
SubscriptionPlan: 'ENTERPRISE' | 'PRO';
|
|
13
13
|
}
|
|
14
14
|
interface DefinedInputFields {
|
|
15
|
-
CreateContractInput: 'clientId' | '
|
|
16
|
-
UpdateContractInput: 'clientId' | '
|
|
15
|
+
CreateContractInput: 'clientId' | 'purchaseOrders' | 'startDate' | 'endDate' | 'remarks' | 'amount' | 'documentType' | 'billingCycle' | 'product' | 'plan' | 'msCloud' | 'isActive' | 'operationsLimit';
|
|
16
|
+
UpdateContractInput: 'clientId' | 'purchaseOrders' | 'startDate' | 'endDate' | 'remarks' | 'amount' | 'documentType' | 'billingCycle' | 'product' | 'plan' | 'msCloud' | 'isActive' | 'operationsLimit';
|
|
17
17
|
}
|
|
18
18
|
export type Query = Pick<Types.Query, DefinedFields['Query']>;
|
|
19
19
|
export type Contract = Pick<Types.Contract, DefinedFields['Contract']>;
|
|
@@ -57,7 +57,7 @@ export declare namespace ContractsModule {
|
|
|
57
57
|
'*'?: gm.Middleware[];
|
|
58
58
|
id?: gm.Middleware[];
|
|
59
59
|
client?: gm.Middleware[];
|
|
60
|
-
|
|
60
|
+
purchaseOrders?: gm.Middleware[];
|
|
61
61
|
startDate?: gm.Middleware[];
|
|
62
62
|
endDate?: gm.Middleware[];
|
|
63
63
|
remarks?: gm.Middleware[];
|
|
@@ -68,6 +68,7 @@ export declare namespace ContractsModule {
|
|
|
68
68
|
product?: gm.Middleware[];
|
|
69
69
|
plan?: gm.Middleware[];
|
|
70
70
|
msCloud?: gm.Middleware[];
|
|
71
|
+
operationsLimit?: gm.Middleware[];
|
|
71
72
|
};
|
|
72
73
|
}
|
|
73
74
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/modules/contracts/__generated__/types.ts"],"names":[],"mappings":"AAEA,MAAM,KAAW,eAAe,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/modules/contracts/__generated__/types.ts"],"names":[],"mappings":"AAEA,MAAM,KAAW,eAAe,CA6E/B;AA7ED,WAAiB,eAAe;IAK7B,CAAC;IAMD,CAAC;IAKD,CAAC;IA0BD,CAAC;IAkCD,CAAC;AACJ,CAAC,EA7EgB,eAAe,KAAf,eAAe,QA6E/B"}
|
|
@@ -26,9 +26,9 @@ const updateContract = sql `
|
|
|
26
26
|
$client_id,
|
|
27
27
|
client_id
|
|
28
28
|
),
|
|
29
|
-
|
|
30
|
-
$
|
|
31
|
-
|
|
29
|
+
purchase_orders = COALESCE(
|
|
30
|
+
$purchase_orders,
|
|
31
|
+
purchase_orders
|
|
32
32
|
),
|
|
33
33
|
start_date = COALESCE(
|
|
34
34
|
$start_date,
|
|
@@ -73,6 +73,10 @@ const updateContract = sql `
|
|
|
73
73
|
ms_cloud = COALESCE(
|
|
74
74
|
$ms_cloud,
|
|
75
75
|
ms_cloud
|
|
76
|
+
),
|
|
77
|
+
operations_count = COALESCE(
|
|
78
|
+
$operationsLimit,
|
|
79
|
+
operations_count
|
|
76
80
|
)
|
|
77
81
|
WHERE
|
|
78
82
|
id = $contractId
|
|
@@ -81,7 +85,7 @@ const updateContract = sql `
|
|
|
81
85
|
const insertContract = sql `
|
|
82
86
|
INSERT INTO accounter_schema.clients_contracts (
|
|
83
87
|
client_id,
|
|
84
|
-
|
|
88
|
+
purchase_orders,
|
|
85
89
|
start_date,
|
|
86
90
|
end_date,
|
|
87
91
|
remarks,
|
|
@@ -92,10 +96,11 @@ const insertContract = sql `
|
|
|
92
96
|
product,
|
|
93
97
|
plan,
|
|
94
98
|
is_active,
|
|
95
|
-
ms_cloud
|
|
99
|
+
ms_cloud,
|
|
100
|
+
operations_count
|
|
96
101
|
)
|
|
97
102
|
VALUES ($clientId,
|
|
98
|
-
$
|
|
103
|
+
$purchaseOrders,
|
|
99
104
|
$startDate,
|
|
100
105
|
$endDate,
|
|
101
106
|
$remarks,
|
|
@@ -106,7 +111,8 @@ const insertContract = sql `
|
|
|
106
111
|
$product,
|
|
107
112
|
$plan,
|
|
108
113
|
$isActive,
|
|
109
|
-
$msCloud
|
|
114
|
+
$msCloud,
|
|
115
|
+
$operationsLimit)
|
|
110
116
|
RETURNING *;`;
|
|
111
117
|
let ContractsProvider = class ContractsProvider {
|
|
112
118
|
dbProvider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.provider.js","sourceRoot":"","sources":["../../../../../../src/modules/contracts/providers/contracts.provider.ts"],"names":[],"mappings":";AAAA,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AACnE,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAanD,MAAM,mBAAmB,GAAG,GAAG,CAA2B;;;6BAG7B,CAAC;AAE9B,MAAM,iBAAiB,GAAG,GAAG,CAAyB;;;uBAG/B,CAAC;AAExB,MAAM,uBAAuB,GAAG,GAAG,CAA+B;;;oCAG9B,CAAC;AAErC,MAAM,cAAc,GAAG,GAAG,CAAsB;;oBAE5B,CAAC;AAErB,MAAM,cAAc,GAAG,GAAG,CAAsB
|
|
1
|
+
{"version":3,"file":"contracts.provider.js","sourceRoot":"","sources":["../../../../../../src/modules/contracts/providers/contracts.provider.ts"],"names":[],"mappings":";AAAA,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AACnE,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAanD,MAAM,mBAAmB,GAAG,GAAG,CAA2B;;;6BAG7B,CAAC;AAE9B,MAAM,iBAAiB,GAAG,GAAG,CAAyB;;;uBAG/B,CAAC;AAExB,MAAM,uBAAuB,GAAG,GAAG,CAA+B;;;oCAG9B,CAAC;AAErC,MAAM,cAAc,GAAG,GAAG,CAAsB;;oBAE5B,CAAC;AAErB,MAAM,cAAc,GAAG,GAAG,CAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8D3C,CAAC;AAEN,MAAM,cAAc,GAAG,GAAG,CAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA+B3B,CAAC;AAMf,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAKR;IAJpB,KAAK,GAAG,gBAAgB,CAAC;QACvB,MAAM,EAAE,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OAAO,eAAe,CAAC;IACzB,CAAC;IAEM,KAAK,CAAC,cAAc,CAAC,UAAkB;QAC5C,MAAM,cAAc,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAC9D,IAAI,CAAC,UAAU,EAAE,CAAC;QAClB,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,0BAA0B,CAAC,UAAkB;QACxD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACpE,IAAI,QAAQ,EAAE,CAAC;YACb,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,oBAAoB,QAAQ,CAAC,SAAS,EAAE,CAAC,CAAC;QAC9D,CAAC;QACD,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY,UAAU,EAAE,CAAC,CAAC;IAC9C,CAAC;IAEM,UAAU;QACf,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;CACF,CAAA;AAhFY,iBAAiB;IAJ7B,UAAU,CAAC;QACV,KAAK,EAAE,KAAK,CAAC,SAAS;QACtB,MAAM,EAAE,IAAI;KACb,CAAC;qCAMgC,UAAU;GAL/B,iBAAiB,CAgF7B"}
|
|
@@ -40,9 +40,10 @@ export const contractsResolvers = {
|
|
|
40
40
|
msCloud: input.msCloud?.toString(),
|
|
41
41
|
plan: input.plan,
|
|
42
42
|
product: input.product,
|
|
43
|
-
|
|
43
|
+
purchaseOrders: [...input.purchaseOrders],
|
|
44
44
|
remarks: input.remarks,
|
|
45
45
|
startDate: input.startDate,
|
|
46
|
+
operationsLimit: input.operationsLimit,
|
|
46
47
|
};
|
|
47
48
|
return injector.get(ContractsProvider).createContract(params);
|
|
48
49
|
}
|
|
@@ -65,9 +66,10 @@ export const contractsResolvers = {
|
|
|
65
66
|
ms_cloud: input.msCloud?.toString(),
|
|
66
67
|
plan: input.plan,
|
|
67
68
|
product: input.product,
|
|
68
|
-
|
|
69
|
+
purchase_orders: [...input.purchaseOrders],
|
|
69
70
|
remarks: input.remarks,
|
|
70
71
|
start_date: input.startDate,
|
|
72
|
+
operationsLimit: input.operationsLimit,
|
|
71
73
|
};
|
|
72
74
|
return injector.get(ContractsProvider).updateContract(params);
|
|
73
75
|
}
|
|
@@ -102,7 +104,7 @@ export const contractsResolvers = {
|
|
|
102
104
|
throw new GraphQLError('Error fetching client');
|
|
103
105
|
});
|
|
104
106
|
},
|
|
105
|
-
|
|
107
|
+
purchaseOrders: dbContract => dbContract.purchase_orders, //String[]
|
|
106
108
|
startDate: dbContract => dateToTimelessDateString(dbContract.start_date), //TimelessDate!
|
|
107
109
|
endDate: dbContract => dateToTimelessDateString(dbContract.end_date), //TimelessDate!
|
|
108
110
|
remarks: dbContract => dbContract.remarks, //String
|
|
@@ -113,6 +115,7 @@ export const contractsResolvers = {
|
|
|
113
115
|
product: dbContract => normalizeProduct(dbContract.product), //Product!
|
|
114
116
|
plan: dbContract => normalizeSubscriptionPlan(dbContract.plan), //SubscriptionPlan!
|
|
115
117
|
msCloud: dbContract => dbContract.ms_cloud, //URL
|
|
118
|
+
operationsLimit: dbContract => Number(dbContract.operations_count), //Int
|
|
116
119
|
},
|
|
117
120
|
};
|
|
118
121
|
//# sourceMappingURL=contracts.resolver.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.resolver.js","sourceRoot":"","sources":["../../../../../../src/modules/contracts/resolvers/contracts.resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,2DAA2D,CAAC;AAC5F,OAAO,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAClF,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB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C,QAAQ;oBACxB,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,QAAQ;oBAC/B,YAAY,EAAE,KAAK,CAAC,YAAY;oBAChC,OAAO,EAAE,KAAK,CAAC,OAAO;oBACtB,QAAQ,EAAE,KAAK,CAAC,QAAQ;oBACxB,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,QAAQ,EAAE;oBAClC,IAAI,EAAE,KAAK,CAAC,IAAI;oBAChB,OAAO,EAAE,KAAK,CAAC,OAAO;oBACtB,
|
|
1
|
+
{"version":3,"file":"contracts.resolver.js","sourceRoot":"","sources":["../../../../../../src/modules/contracts/resolvers/contracts.resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,2DAA2D,CAAC;AAC5F,OAAO,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAClF,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,yBAAyB,GAC1B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAGvE,MAAM,CAAC,MAAM,kBAAkB,GAA8B;IAC3D,KAAK,EAAE;QACL,gBAAgB,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YAC9C,IAAI,CAAC;gBACH,OAAO,QAAQ,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,mBAAmB,EAAE,CAAC;YAC/D,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,OAAO,CAAC,KAAK,CAAC,0BAA0B,EAAE,CAAC,CAAC,CAAC;gBAC7C,MAAM,IAAI,YAAY,CAAC,0BAA0B,CAAC,CAAC;YACrD,CAAC;QACH,CAAC;QACD,iBAAiB,EAAE,KAAK,EAAE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AAwB,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,eAAe;QACrF,OAAO,EAAE,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,QAAQ;QACnD,MAAM,EAAE,UAAU,CAAC,EAAE,CAAC,qBAAqB,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,EAAE,kBAAkB;QACvG,YAAY,EAAE,UAAU,CAAC,EAAE,CAAC,qBAAqB,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,eAAe;QAC5F,YAAY,EAAE,UAAU,CAAC,EAAE,CAAC,qBAAqB,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,eAAe;QAC5F,QAAQ,EAAE,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,IAAI,KAAK,EAAE,UAAU;QACjE,OAAO,EAAE,UAAU,CAAC,EAAE,CAAC,gBAAgB,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,UAAU;QACvE,IAAI,EAAE,UAAU,CAAC,EAAE,CAAC,yBAAyB,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,mBAAmB;QACnF,OAAO,EAAE,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,KAAK;QACjD,eAAe,EAAE,UAAU,CAAC,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,KAAK;KAC1E;CACF,CAAC"}
|
|
@@ -16,7 +16,7 @@ export default gql `
|
|
|
16
16
|
type Contract {
|
|
17
17
|
id: UUID!
|
|
18
18
|
client: Client!
|
|
19
|
-
|
|
19
|
+
purchaseOrders: [String!]!
|
|
20
20
|
startDate: TimelessDate!
|
|
21
21
|
endDate: TimelessDate!
|
|
22
22
|
remarks: String
|
|
@@ -27,6 +27,7 @@ export default gql `
|
|
|
27
27
|
product: Product
|
|
28
28
|
plan: SubscriptionPlan
|
|
29
29
|
msCloud: URL
|
|
30
|
+
operationsLimit: Int!
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
" contract billing cycle "
|
|
@@ -50,7 +51,7 @@ export default gql `
|
|
|
50
51
|
" input for creating a new contract "
|
|
51
52
|
input CreateContractInput {
|
|
52
53
|
clientId: UUID!
|
|
53
|
-
|
|
54
|
+
purchaseOrders: [String!]!
|
|
54
55
|
startDate: TimelessDate!
|
|
55
56
|
endDate: TimelessDate!
|
|
56
57
|
remarks: String
|
|
@@ -61,12 +62,13 @@ export default gql `
|
|
|
61
62
|
plan: SubscriptionPlan
|
|
62
63
|
msCloud: URL
|
|
63
64
|
isActive: Boolean!
|
|
65
|
+
operationsLimit: Int
|
|
64
66
|
}
|
|
65
67
|
|
|
66
68
|
" input for updating a contract "
|
|
67
69
|
input UpdateContractInput {
|
|
68
70
|
clientId: UUID
|
|
69
|
-
|
|
71
|
+
purchaseOrders: [String!]!
|
|
70
72
|
startDate: TimelessDate
|
|
71
73
|
endDate: TimelessDate
|
|
72
74
|
remarks: String
|
|
@@ -77,6 +79,7 @@ export default gql `
|
|
|
77
79
|
plan: SubscriptionPlan
|
|
78
80
|
msCloud: URL
|
|
79
81
|
isActive: Boolean
|
|
82
|
+
operationsLimit: Int
|
|
80
83
|
}
|
|
81
84
|
`;
|
|
82
85
|
//# sourceMappingURL=contracts.graphql.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.graphql.js","sourceRoot":"","sources":["../../../../../../src/modules/contracts/typeDefs/contracts.graphql.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,eAAe,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"contracts.graphql.js","sourceRoot":"","sources":["../../../../../../src/modules/contracts/typeDefs/contracts.graphql.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkFjB,CAAC"}
|