@tolinax/ayoune-interfaces 2024.4.11 → 2024.4.13

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.
@@ -97,20 +97,20 @@ export interface IContract extends IDefaultFields, IFreeFields {
97
97
  _consumerID: ObjectId;
98
98
  _receiver: ObjectId;
99
99
  suppliers: ObjectId[];
100
- user: ObjectId;
101
- username: string;
102
- team: ObjectId[];
103
- agent: string;
104
- ayouneApproval: string;
105
- ayouneContract: IaYOUneContract;
106
- shares: IShare[];
107
- done: boolean;
108
- resourcesProvided: boolean;
109
- resourcesWorking: boolean;
110
- locked: boolean;
111
- demo: boolean;
112
- userDataComplete: boolean;
113
- license: {
100
+ user?: ObjectId;
101
+ username?: string;
102
+ team?: ObjectId[];
103
+ agent?: string;
104
+ ayouneApproval?: string;
105
+ ayouneContract?: IaYOUneContract;
106
+ shares?: IShare[];
107
+ done?: boolean;
108
+ resourcesProvided?: boolean;
109
+ resourcesWorking?: boolean;
110
+ locked?: boolean;
111
+ demo?: boolean;
112
+ userDataComplete?: boolean;
113
+ license?: {
114
114
  active: boolean;
115
115
  activated: boolean;
116
116
  activatedAt: Date;
@@ -120,90 +120,90 @@ export interface IContract extends IDefaultFields, IFreeFields {
120
120
  valid_till: Date;
121
121
  userData: string;
122
122
  };
123
- config: {
123
+ config?: {
124
124
  customConfig: ObjectId;
125
125
  useCase: string;
126
126
  userData: string;
127
127
  };
128
- cancelled: boolean;
129
- cancelledOn: Date;
130
- cancellationReason: string;
131
- sendAuto: boolean;
132
- useCalculationRule: boolean;
133
- hasQuota: boolean;
134
- hasDuration: boolean;
135
- hasCheckLists: boolean;
136
- hasSupplierFeedback: boolean;
137
- hasRequirements: boolean;
138
- hasLicense: boolean;
139
- name: string;
140
- internalName: string;
141
- additionalName: string;
142
- description: string;
143
- nbr: number;
144
- ext_nbr: number;
145
- identifier: number;
146
- referenceNumber: string;
147
- _productGroup: ObjectId;
148
- _product: ObjectId;
149
- productTitle: string;
150
- opportunity: ObjectId;
151
- offer: ObjectId;
152
- assignment: ObjectId;
153
- project: ObjectId;
154
- calendarentry: ObjectId;
155
- mode: string;
156
- type: string;
157
- text_pre: string;
158
- text_post: string;
159
- pricegroup: ObjectId;
160
- discountgroup: ObjectId;
161
- paymentcondition: ObjectId;
162
- calculationRule: ObjectId;
163
- deliverycondition: string;
164
- deposits: ObjectId[];
165
- interval: string;
166
- next_invoice: Date;
167
- contract_beginning: Date;
168
- contract_end: Date;
169
- runtime: number;
170
- runtime_type: string;
171
- rejected_reason: string;
172
- file: ObjectId;
173
- positions: IPosition[];
174
- note: string;
175
- status: string;
176
- contract_date: Date;
177
- final_discount_percent: number;
178
- final_discount_percent_amount: number;
179
- final_discount_percent_reason: string;
180
- final_discount: number;
181
- final_discount_reason: string;
182
- shippingCosts: number;
183
- totalCosts: number;
184
- totalMargin: number;
185
- totalMarginPercent: number;
186
- totalMarginAfterDiscount: number;
187
- totalMarginAfterDiscountPercent: number;
188
- sum: number;
189
- net_total: number;
190
- net_total_external_revenue: number;
191
- total: number;
192
- setupFee: number;
193
- monthly_part: number;
194
- total_part: number;
195
- external_monthly_part: number;
196
- external_total_part: number;
197
- paypalPlan: IContractPayPalPlan;
198
- paypalSubscription: IContractPaypalSubscription;
199
- locale: string;
200
- currency: string;
201
- foreignCountry: boolean;
202
- taxes: any[];
203
- attributes: IAttributeValue[];
204
- comments: IComment[];
205
- watchers: any[];
206
- requirements: IRequirement[];
207
- warnings: IWarning[];
128
+ cancelled?: boolean;
129
+ cancelledOn?: Date;
130
+ cancellationReason?: string;
131
+ sendAuto?: boolean;
132
+ useCalculationRule?: boolean;
133
+ hasQuota?: boolean;
134
+ hasDuration?: boolean;
135
+ hasCheckLists?: boolean;
136
+ hasSupplierFeedback?: boolean;
137
+ hasRequirements?: boolean;
138
+ hasLicense?: boolean;
139
+ name?: string;
140
+ internalName?: string;
141
+ additionalName?: string;
142
+ description?: string;
143
+ nbr?: number;
144
+ ext_nbr?: number;
145
+ identifier?: number;
146
+ referenceNumber?: string;
147
+ _productGroup?: ObjectId;
148
+ _product?: ObjectId;
149
+ productTitle?: string;
150
+ opportunity?: ObjectId;
151
+ offer?: ObjectId;
152
+ assignment?: ObjectId;
153
+ project?: ObjectId;
154
+ calendarentry?: ObjectId;
155
+ mode?: string;
156
+ type?: string;
157
+ text_pre?: string;
158
+ text_post?: string;
159
+ pricegroup?: ObjectId;
160
+ discountgroup?: ObjectId;
161
+ paymentcondition?: ObjectId;
162
+ calculationRule?: ObjectId;
163
+ deliverycondition?: string;
164
+ deposits?: ObjectId[];
165
+ interval?: string;
166
+ next_invoice?: Date;
167
+ contract_beginning?: Date;
168
+ contract_end?: Date;
169
+ runtime?: number;
170
+ runtime_type?: string;
171
+ rejected_reason?: string;
172
+ file?: ObjectId;
173
+ positions?: IPosition[];
174
+ note?: string;
175
+ status?: string;
176
+ contract_date?: Date;
177
+ final_discount_percent?: number;
178
+ final_discount_percent_amount?: number;
179
+ final_discount_percent_reason?: string;
180
+ final_discount?: number;
181
+ final_discount_reason?: string;
182
+ shippingCosts?: number;
183
+ totalCosts?: number;
184
+ totalMargin?: number;
185
+ totalMarginPercent?: number;
186
+ totalMarginAfterDiscount?: number;
187
+ totalMarginAfterDiscountPercent?: number;
188
+ sum?: number;
189
+ net_total?: number;
190
+ net_total_external_revenue?: number;
191
+ total?: number;
192
+ setupFee?: number;
193
+ monthly_part?: number;
194
+ total_part?: number;
195
+ external_monthly_part?: number;
196
+ external_total_part?: number;
197
+ paypalPlan?: IContractPayPalPlan;
198
+ paypalSubscription?: IContractPaypalSubscription;
199
+ locale?: string;
200
+ currency?: string;
201
+ foreignCountry?: boolean;
202
+ taxes?: any[];
203
+ attributes?: IAttributeValue[];
204
+ comments?: IComment[];
205
+ watchers?: any[];
206
+ requirements?: IRequirement[];
207
+ warnings?: IWarning[];
208
208
  }
209
209
  export {};
@@ -20,14 +20,55 @@ export interface IBasicAuth {
20
20
  user?: string;
21
21
  pass?: string;
22
22
  }
23
+ interface ISchema {
24
+ type: string;
25
+ items?: ISchema;
26
+ }
27
+ interface IOperation {
28
+ description?: string;
29
+ parameters?: {
30
+ name: string;
31
+ in: string;
32
+ description?: string;
33
+ required?: boolean;
34
+ schema: {
35
+ $ref: string;
36
+ };
37
+ }[];
38
+ responses: {
39
+ [responseCode: string]: {
40
+ description: string;
41
+ content?: {
42
+ [contentType: string]: {
43
+ schema: ISchema;
44
+ };
45
+ };
46
+ };
47
+ };
48
+ }
49
+ interface IPathItem {
50
+ get?: IOperation;
51
+ put?: IOperation;
52
+ post?: IOperation;
53
+ delete?: IOperation;
54
+ options?: IOperation;
55
+ head?: IOperation;
56
+ patch?: IOperation;
57
+ trace?: IOperation;
58
+ }
59
+ interface IOpenApiSpec {
60
+ [path: string]: IPathItem;
61
+ }
23
62
  export interface IaYOUneApiAction extends IDefaultFields {
24
63
  name?: string;
25
- short_description?: string;
64
+ shortDescription?: string;
26
65
  description?: string;
27
66
  method?: string;
28
- namespace?: string;
67
+ nameSpace?: string;
29
68
  modelName?: string;
30
69
  capability?: string;
70
+ action?: string;
71
+ operationId?: string;
31
72
  output?: string;
32
73
  host?: string;
33
74
  endpoint?: string;
@@ -38,6 +79,8 @@ export interface IaYOUneApiAction extends IDefaultFields {
38
79
  body?: string;
39
80
  answer?: string;
40
81
  useBasicAuth?: boolean;
41
- basicauth?: IBasicAuth;
82
+ basicAuth?: IBasicAuth;
42
83
  debug?: boolean;
84
+ responses: IOpenApiSpec;
43
85
  }
86
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tolinax/ayoune-interfaces",
3
- "version": "2024.4.11",
3
+ "version": "2024.4.13",
4
4
  "description": "Houses TypeScript interfaces for aYOUne",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",