@itzenata/efact-node 1.0.1

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.
Files changed (117) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +154 -0
  3. package/dist/_generated/api/invoices-api.d.ts +367 -0
  4. package/dist/_generated/api/invoices-api.d.ts.map +1 -0
  5. package/dist/_generated/api/invoices-api.js +485 -0
  6. package/dist/_generated/api/invoices-api.js.map +1 -0
  7. package/dist/_generated/api.d.ts +13 -0
  8. package/dist/_generated/api.d.ts.map +1 -0
  9. package/dist/_generated/api.js +16 -0
  10. package/dist/_generated/api.js.map +1 -0
  11. package/dist/_generated/base.d.ts +67 -0
  12. package/dist/_generated/base.d.ts.map +1 -0
  13. package/dist/_generated/base.js +65 -0
  14. package/dist/_generated/base.js.map +1 -0
  15. package/dist/_generated/common.d.ts +66 -0
  16. package/dist/_generated/common.d.ts.map +1 -0
  17. package/dist/_generated/common.js +135 -0
  18. package/dist/_generated/common.js.map +1 -0
  19. package/dist/_generated/configuration.d.ts +92 -0
  20. package/dist/_generated/configuration.d.ts.map +1 -0
  21. package/dist/_generated/configuration.js +97 -0
  22. package/dist/_generated/configuration.js.map +1 -0
  23. package/dist/_generated/index.d.ts +15 -0
  24. package/dist/_generated/index.d.ts.map +1 -0
  25. package/dist/_generated/index.js +18 -0
  26. package/dist/_generated/index.js.map +1 -0
  27. package/dist/_generated/models/api-response-invoice-response.d.ts +45 -0
  28. package/dist/_generated/models/api-response-invoice-response.d.ts.map +1 -0
  29. package/dist/_generated/models/api-response-invoice-response.js +16 -0
  30. package/dist/_generated/models/api-response-invoice-response.js.map +1 -0
  31. package/dist/_generated/models/api-response-invoice-status-response.d.ts +45 -0
  32. package/dist/_generated/models/api-response-invoice-status-response.d.ts.map +1 -0
  33. package/dist/_generated/models/api-response-invoice-status-response.js +16 -0
  34. package/dist/_generated/models/api-response-invoice-status-response.js.map +1 -0
  35. package/dist/_generated/models/api-response-page-response-invoice-response.d.ts +45 -0
  36. package/dist/_generated/models/api-response-page-response-invoice-response.d.ts.map +1 -0
  37. package/dist/_generated/models/api-response-page-response-invoice-response.js +16 -0
  38. package/dist/_generated/models/api-response-page-response-invoice-response.js.map +1 -0
  39. package/dist/_generated/models/create-invoice-line-request.d.ts +55 -0
  40. package/dist/_generated/models/create-invoice-line-request.d.ts.map +1 -0
  41. package/dist/_generated/models/create-invoice-line-request.js +16 -0
  42. package/dist/_generated/models/create-invoice-line-request.js.map +1 -0
  43. package/dist/_generated/models/create-invoice-request.d.ts +82 -0
  44. package/dist/_generated/models/create-invoice-request.d.ts.map +1 -0
  45. package/dist/_generated/models/create-invoice-request.js +22 -0
  46. package/dist/_generated/models/create-invoice-request.js.map +1 -0
  47. package/dist/_generated/models/field-error.d.ts +31 -0
  48. package/dist/_generated/models/field-error.d.ts.map +1 -0
  49. package/dist/_generated/models/field-error.js +16 -0
  50. package/dist/_generated/models/field-error.js.map +1 -0
  51. package/dist/_generated/models/index.d.ts +11 -0
  52. package/dist/_generated/models/index.d.ts.map +1 -0
  53. package/dist/_generated/models/index.js +12 -0
  54. package/dist/_generated/models/index.js.map +1 -0
  55. package/dist/_generated/models/invoice-response.d.ts +221 -0
  56. package/dist/_generated/models/invoice-response.d.ts.map +1 -0
  57. package/dist/_generated/models/invoice-response.js +24 -0
  58. package/dist/_generated/models/invoice-response.js.map +1 -0
  59. package/dist/_generated/models/invoice-status-response.d.ts +83 -0
  60. package/dist/_generated/models/invoice-status-response.d.ts.map +1 -0
  61. package/dist/_generated/models/invoice-status-response.js +24 -0
  62. package/dist/_generated/models/invoice-status-response.js.map +1 -0
  63. package/dist/_generated/models/page-response-invoice-response.d.ts +62 -0
  64. package/dist/_generated/models/page-response-invoice-response.d.ts.map +1 -0
  65. package/dist/_generated/models/page-response-invoice-response.js +16 -0
  66. package/dist/_generated/models/page-response-invoice-response.js.map +1 -0
  67. package/dist/_generated/models/update-invoice-request.d.ts +121 -0
  68. package/dist/_generated/models/update-invoice-request.d.ts.map +1 -0
  69. package/dist/_generated/models/update-invoice-request.js +31 -0
  70. package/dist/_generated/models/update-invoice-request.js.map +1 -0
  71. package/dist/client.d.ts +73 -0
  72. package/dist/client.d.ts.map +1 -0
  73. package/dist/client.js +155 -0
  74. package/dist/client.js.map +1 -0
  75. package/dist/errors.d.ts +100 -0
  76. package/dist/errors.d.ts.map +1 -0
  77. package/dist/errors.js +129 -0
  78. package/dist/errors.js.map +1 -0
  79. package/dist/index.d.ts +7 -0
  80. package/dist/index.d.ts.map +1 -0
  81. package/dist/index.js +9 -0
  82. package/dist/index.js.map +1 -0
  83. package/dist/invoices.d.ts +36 -0
  84. package/dist/invoices.d.ts.map +1 -0
  85. package/dist/invoices.js +53 -0
  86. package/dist/invoices.js.map +1 -0
  87. package/dist/runtime.d.ts +34 -0
  88. package/dist/runtime.d.ts.map +1 -0
  89. package/dist/runtime.js +105 -0
  90. package/dist/runtime.js.map +1 -0
  91. package/package.json +66 -0
  92. package/src/_generated/.openapi-generator/FILES +21 -0
  93. package/src/_generated/.openapi-generator/VERSION +1 -0
  94. package/src/_generated/.openapi-generator-ignore +23 -0
  95. package/src/_generated/api/invoices-api.ts +662 -0
  96. package/src/_generated/api.ts +19 -0
  97. package/src/_generated/base.ts +87 -0
  98. package/src/_generated/common.ts +151 -0
  99. package/src/_generated/configuration.ts +111 -0
  100. package/src/_generated/git_push.sh +57 -0
  101. package/src/_generated/index.ts +19 -0
  102. package/src/_generated/models/api-response-invoice-response.ts +55 -0
  103. package/src/_generated/models/api-response-invoice-status-response.ts +55 -0
  104. package/src/_generated/models/api-response-page-response-invoice-response.ts +55 -0
  105. package/src/_generated/models/create-invoice-line-request.ts +61 -0
  106. package/src/_generated/models/create-invoice-request.ts +93 -0
  107. package/src/_generated/models/field-error.ts +37 -0
  108. package/src/_generated/models/index.ts +11 -0
  109. package/src/_generated/models/invoice-response.ts +230 -0
  110. package/src/_generated/models/invoice-status-response.ts +92 -0
  111. package/src/_generated/models/page-response-invoice-response.ts +70 -0
  112. package/src/_generated/models/update-invoice-request.ts +131 -0
  113. package/src/client.ts +215 -0
  114. package/src/errors.ts +166 -0
  115. package/src/index.ts +35 -0
  116. package/src/invoices.ts +80 -0
  117. package/src/runtime.ts +179 -0
@@ -0,0 +1,87 @@
1
+ // @ts-nocheck
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EFact API
6
+ * Compliance-as-a-service backend for Moroccan DGI electronic invoicing
7
+ *
8
+ * The version of the OpenAPI document: v0.0.1-SNAPSHOT
9
+ * Contact: contact@itzenata.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+
16
+
17
+ import type { Configuration } from './configuration.js';
18
+ // Some imports not used depending on template conditions
19
+ // @ts-ignore
20
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
21
+ import globalAxios from 'axios';
22
+
23
+ export const BASE_PATH = "https://preview.efact-api.itzenata.com".replace(/\/+$/, "");
24
+
25
+ /**
26
+ *
27
+ * @export
28
+ */
29
+ export const COLLECTION_FORMATS = {
30
+ csv: ",",
31
+ ssv: " ",
32
+ tsv: "\t",
33
+ pipes: "|",
34
+ };
35
+
36
+ /**
37
+ *
38
+ * @export
39
+ * @interface RequestArgs
40
+ */
41
+ export interface RequestArgs {
42
+ url: string;
43
+ options: RawAxiosRequestConfig;
44
+ }
45
+
46
+ /**
47
+ *
48
+ * @export
49
+ * @class BaseAPI
50
+ */
51
+ export class BaseAPI {
52
+ protected configuration: Configuration | undefined;
53
+
54
+ constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
55
+ if (configuration) {
56
+ this.configuration = configuration;
57
+ this.basePath = configuration.basePath ?? basePath;
58
+ }
59
+ }
60
+ };
61
+
62
+ /**
63
+ *
64
+ * @export
65
+ * @class RequiredError
66
+ * @extends {Error}
67
+ */
68
+ export class RequiredError extends Error {
69
+ constructor(public field: string, msg?: string) {
70
+ super(msg);
71
+ this.name = "RequiredError"
72
+ }
73
+ }
74
+
75
+ interface ServerMap {
76
+ [key: string]: {
77
+ url: string,
78
+ description: string,
79
+ }[];
80
+ }
81
+
82
+ /**
83
+ *
84
+ * @export
85
+ */
86
+ export const operationServerMap: ServerMap = {
87
+ }
@@ -0,0 +1,151 @@
1
+ // @ts-nocheck
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EFact API
6
+ * Compliance-as-a-service backend for Moroccan DGI electronic invoicing
7
+ *
8
+ * The version of the OpenAPI document: v0.0.1-SNAPSHOT
9
+ * Contact: contact@itzenata.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+
16
+
17
+ import type { Configuration } from "./configuration.js";
18
+ import type { RequestArgs } from "./base.js";
19
+ import type { AxiosInstance, AxiosResponse } from 'axios';
20
+ import { RequiredError } from "./base.js";
21
+
22
+ /**
23
+ *
24
+ * @export
25
+ */
26
+ export const DUMMY_BASE_URL = 'https://example.com'
27
+
28
+ /**
29
+ *
30
+ * @throws {RequiredError}
31
+ * @export
32
+ */
33
+ export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) {
34
+ if (paramValue === null || paramValue === undefined) {
35
+ throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
36
+ }
37
+ }
38
+
39
+ /**
40
+ *
41
+ * @export
42
+ */
43
+ export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) {
44
+ if (configuration && configuration.apiKey) {
45
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
46
+ ? await configuration.apiKey(keyParamName)
47
+ : await configuration.apiKey;
48
+ object[keyParamName] = localVarApiKeyValue;
49
+ }
50
+ }
51
+
52
+ /**
53
+ *
54
+ * @export
55
+ */
56
+ export const setBasicAuthToObject = function (object: any, configuration?: Configuration) {
57
+ if (configuration && (configuration.username || configuration.password)) {
58
+ object["auth"] = { username: configuration.username, password: configuration.password };
59
+ }
60
+ }
61
+
62
+ /**
63
+ *
64
+ * @export
65
+ */
66
+ export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) {
67
+ if (configuration && configuration.accessToken) {
68
+ const accessToken = typeof configuration.accessToken === 'function'
69
+ ? await configuration.accessToken()
70
+ : await configuration.accessToken;
71
+ object["Authorization"] = "Bearer " + accessToken;
72
+ }
73
+ }
74
+
75
+ /**
76
+ *
77
+ * @export
78
+ */
79
+ export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) {
80
+ if (configuration && configuration.accessToken) {
81
+ const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
82
+ ? await configuration.accessToken(name, scopes)
83
+ : await configuration.accessToken;
84
+ object["Authorization"] = "Bearer " + localVarAccessTokenValue;
85
+ }
86
+ }
87
+
88
+ function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
89
+ if (parameter == null) return;
90
+ if (typeof parameter === "object") {
91
+ if (Array.isArray(parameter)) {
92
+ (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
93
+ }
94
+ else {
95
+ Object.keys(parameter).forEach(currentKey =>
96
+ setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`)
97
+ );
98
+ }
99
+ }
100
+ else {
101
+ if (urlSearchParams.has(key)) {
102
+ urlSearchParams.append(key, parameter);
103
+ }
104
+ else {
105
+ urlSearchParams.set(key, parameter);
106
+ }
107
+ }
108
+ }
109
+
110
+ /**
111
+ *
112
+ * @export
113
+ */
114
+ export const setSearchParams = function (url: URL, ...objects: any[]) {
115
+ const searchParams = new URLSearchParams(url.search);
116
+ setFlattenedQueryParams(searchParams, objects);
117
+ url.search = searchParams.toString();
118
+ }
119
+
120
+ /**
121
+ *
122
+ * @export
123
+ */
124
+ export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) {
125
+ const nonString = typeof value !== 'string';
126
+ const needsSerialization = nonString && configuration && configuration.isJsonMime
127
+ ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
128
+ : nonString;
129
+ return needsSerialization
130
+ ? JSON.stringify(value !== undefined ? value : {})
131
+ : (value || "");
132
+ }
133
+
134
+ /**
135
+ *
136
+ * @export
137
+ */
138
+ export const toPathString = function (url: URL) {
139
+ return url.pathname + url.search + url.hash
140
+ }
141
+
142
+ /**
143
+ *
144
+ * @export
145
+ */
146
+ export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {
147
+ return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
148
+ const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url};
149
+ return axios.request<T, R>(axiosRequestArgs);
150
+ };
151
+ }
@@ -0,0 +1,111 @@
1
+ // @ts-nocheck
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EFact API
6
+ * Compliance-as-a-service backend for Moroccan DGI electronic invoicing
7
+ *
8
+ * The version of the OpenAPI document: v0.0.1-SNAPSHOT
9
+ * Contact: contact@itzenata.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+
16
+
17
+ export interface ConfigurationParameters {
18
+ apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
19
+ username?: string;
20
+ password?: string;
21
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
22
+ basePath?: string;
23
+ serverIndex?: number;
24
+ baseOptions?: any;
25
+ formDataCtor?: new () => any;
26
+ }
27
+
28
+ export class Configuration {
29
+ /**
30
+ * parameter for apiKey security
31
+ * @param name security name
32
+ * @memberof Configuration
33
+ */
34
+ apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
35
+ /**
36
+ * parameter for basic security
37
+ *
38
+ * @type {string}
39
+ * @memberof Configuration
40
+ */
41
+ username?: string;
42
+ /**
43
+ * parameter for basic security
44
+ *
45
+ * @type {string}
46
+ * @memberof Configuration
47
+ */
48
+ password?: string;
49
+ /**
50
+ * parameter for oauth2 security
51
+ * @param name security name
52
+ * @param scopes oauth2 scope
53
+ * @memberof Configuration
54
+ */
55
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
56
+ /**
57
+ * override base path
58
+ *
59
+ * @type {string}
60
+ * @memberof Configuration
61
+ */
62
+ basePath?: string;
63
+ /**
64
+ * override server index
65
+ *
66
+ * @type {number}
67
+ * @memberof Configuration
68
+ */
69
+ serverIndex?: number;
70
+ /**
71
+ * base options for axios calls
72
+ *
73
+ * @type {any}
74
+ * @memberof Configuration
75
+ */
76
+ baseOptions?: any;
77
+ /**
78
+ * The FormData constructor that will be used to create multipart form data
79
+ * requests. You can inject this here so that execution environments that
80
+ * do not support the FormData class can still run the generated client.
81
+ *
82
+ * @type {new () => FormData}
83
+ */
84
+ formDataCtor?: new () => any;
85
+
86
+ constructor(param: ConfigurationParameters = {}) {
87
+ this.apiKey = param.apiKey;
88
+ this.username = param.username;
89
+ this.password = param.password;
90
+ this.accessToken = param.accessToken;
91
+ this.basePath = param.basePath;
92
+ this.serverIndex = param.serverIndex;
93
+ this.baseOptions = param.baseOptions;
94
+ this.formDataCtor = param.formDataCtor;
95
+ }
96
+
97
+ /**
98
+ * Check if the given MIME is a JSON MIME.
99
+ * JSON MIME examples:
100
+ * application/json
101
+ * application/json; charset=UTF8
102
+ * APPLICATION/JSON
103
+ * application/vnd.company+json
104
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
105
+ * @return True if the given MIME is JSON, false otherwise.
106
+ */
107
+ public isJsonMime(mime: string): boolean {
108
+ const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
109
+ return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
110
+ }
111
+ }
@@ -0,0 +1,57 @@
1
+ #!/bin/sh
2
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
3
+ #
4
+ # Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
5
+
6
+ git_user_id=$1
7
+ git_repo_id=$2
8
+ release_note=$3
9
+ git_host=$4
10
+
11
+ if [ "$git_host" = "" ]; then
12
+ git_host="github.com"
13
+ echo "[INFO] No command line input provided. Set \$git_host to $git_host"
14
+ fi
15
+
16
+ if [ "$git_user_id" = "" ]; then
17
+ git_user_id="GIT_USER_ID"
18
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
19
+ fi
20
+
21
+ if [ "$git_repo_id" = "" ]; then
22
+ git_repo_id="GIT_REPO_ID"
23
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
24
+ fi
25
+
26
+ if [ "$release_note" = "" ]; then
27
+ release_note="Minor update"
28
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
29
+ fi
30
+
31
+ # Initialize the local directory as a Git repository
32
+ git init
33
+
34
+ # Adds the files in the local repository and stages them for commit.
35
+ git add .
36
+
37
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
38
+ git commit -m "$release_note"
39
+
40
+ # Sets the new remote
41
+ git_remote=$(git remote)
42
+ if [ "$git_remote" = "" ]; then # git remote not defined
43
+
44
+ if [ "$GIT_TOKEN" = "" ]; then
45
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
46
+ git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
47
+ else
48
+ git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
49
+ fi
50
+
51
+ fi
52
+
53
+ git pull origin master
54
+
55
+ # Pushes (Forces) the changes in the local repository up to the remote repository
56
+ echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
57
+ git push origin master 2>&1 | grep -v 'To https'
@@ -0,0 +1,19 @@
1
+ // @ts-nocheck
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EFact API
6
+ * Compliance-as-a-service backend for Moroccan DGI electronic invoicing
7
+ *
8
+ * The version of the OpenAPI document: v0.0.1-SNAPSHOT
9
+ * Contact: contact@itzenata.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+
16
+
17
+ export * from "./api.js";
18
+ export * from "./configuration.js";
19
+ export * from "./models/index.js";
@@ -0,0 +1,55 @@
1
+ // @ts-nocheck
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EFact API
6
+ * Compliance-as-a-service backend for Moroccan DGI electronic invoicing
7
+ *
8
+ * The version of the OpenAPI document: v0.0.1-SNAPSHOT
9
+ * Contact: contact@itzenata.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+
16
+
17
+ // May contain unused imports in some cases
18
+ // @ts-ignore
19
+ import type { FieldError } from './field-error.js';
20
+ // May contain unused imports in some cases
21
+ // @ts-ignore
22
+ import type { InvoiceResponse } from './invoice-response.js';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface ApiResponseInvoiceResponse
28
+ */
29
+ export interface ApiResponseInvoiceResponse {
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof ApiResponseInvoiceResponse
34
+ */
35
+ 'code'?: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof ApiResponseInvoiceResponse
40
+ */
41
+ 'message'?: string;
42
+ /**
43
+ *
44
+ * @type {InvoiceResponse}
45
+ * @memberof ApiResponseInvoiceResponse
46
+ */
47
+ 'data'?: InvoiceResponse;
48
+ /**
49
+ *
50
+ * @type {Array<FieldError>}
51
+ * @memberof ApiResponseInvoiceResponse
52
+ */
53
+ 'errors'?: Array<FieldError>;
54
+ }
55
+
@@ -0,0 +1,55 @@
1
+ // @ts-nocheck
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EFact API
6
+ * Compliance-as-a-service backend for Moroccan DGI electronic invoicing
7
+ *
8
+ * The version of the OpenAPI document: v0.0.1-SNAPSHOT
9
+ * Contact: contact@itzenata.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+
16
+
17
+ // May contain unused imports in some cases
18
+ // @ts-ignore
19
+ import type { FieldError } from './field-error.js';
20
+ // May contain unused imports in some cases
21
+ // @ts-ignore
22
+ import type { InvoiceStatusResponse } from './invoice-status-response.js';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface ApiResponseInvoiceStatusResponse
28
+ */
29
+ export interface ApiResponseInvoiceStatusResponse {
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof ApiResponseInvoiceStatusResponse
34
+ */
35
+ 'code'?: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof ApiResponseInvoiceStatusResponse
40
+ */
41
+ 'message'?: string;
42
+ /**
43
+ *
44
+ * @type {InvoiceStatusResponse}
45
+ * @memberof ApiResponseInvoiceStatusResponse
46
+ */
47
+ 'data'?: InvoiceStatusResponse;
48
+ /**
49
+ *
50
+ * @type {Array<FieldError>}
51
+ * @memberof ApiResponseInvoiceStatusResponse
52
+ */
53
+ 'errors'?: Array<FieldError>;
54
+ }
55
+
@@ -0,0 +1,55 @@
1
+ // @ts-nocheck
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EFact API
6
+ * Compliance-as-a-service backend for Moroccan DGI electronic invoicing
7
+ *
8
+ * The version of the OpenAPI document: v0.0.1-SNAPSHOT
9
+ * Contact: contact@itzenata.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+
16
+
17
+ // May contain unused imports in some cases
18
+ // @ts-ignore
19
+ import type { FieldError } from './field-error.js';
20
+ // May contain unused imports in some cases
21
+ // @ts-ignore
22
+ import type { PageResponseInvoiceResponse } from './page-response-invoice-response.js';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface ApiResponsePageResponseInvoiceResponse
28
+ */
29
+ export interface ApiResponsePageResponseInvoiceResponse {
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof ApiResponsePageResponseInvoiceResponse
34
+ */
35
+ 'code'?: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof ApiResponsePageResponseInvoiceResponse
40
+ */
41
+ 'message'?: string;
42
+ /**
43
+ *
44
+ * @type {PageResponseInvoiceResponse}
45
+ * @memberof ApiResponsePageResponseInvoiceResponse
46
+ */
47
+ 'data'?: PageResponseInvoiceResponse;
48
+ /**
49
+ *
50
+ * @type {Array<FieldError>}
51
+ * @memberof ApiResponsePageResponseInvoiceResponse
52
+ */
53
+ 'errors'?: Array<FieldError>;
54
+ }
55
+
@@ -0,0 +1,61 @@
1
+ // @ts-nocheck
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EFact API
6
+ * Compliance-as-a-service backend for Moroccan DGI electronic invoicing
7
+ *
8
+ * The version of the OpenAPI document: v0.0.1-SNAPSHOT
9
+ * Contact: contact@itzenata.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+
16
+
17
+
18
+ /**
19
+ * A single line item on an invoice
20
+ * @export
21
+ * @interface CreateInvoiceLineRequest
22
+ */
23
+ export interface CreateInvoiceLineRequest {
24
+ /**
25
+ * Line number (1-based, must be unique within the invoice)
26
+ * @type {number}
27
+ * @memberof CreateInvoiceLineRequest
28
+ */
29
+ 'lineNumber': number;
30
+ /**
31
+ * Description of the product or service
32
+ * @type {string}
33
+ * @memberof CreateInvoiceLineRequest
34
+ */
35
+ 'description': string;
36
+ /**
37
+ * Quantity of units
38
+ * @type {number}
39
+ * @memberof CreateInvoiceLineRequest
40
+ */
41
+ 'quantity': number;
42
+ /**
43
+ * Unit of measure
44
+ * @type {string}
45
+ * @memberof CreateInvoiceLineRequest
46
+ */
47
+ 'unit'?: string;
48
+ /**
49
+ * Price per unit before tax (HT), in the invoice currency
50
+ * @type {number}
51
+ * @memberof CreateInvoiceLineRequest
52
+ */
53
+ 'unitPrice': number;
54
+ /**
55
+ * VAT rate as a decimal (e.g. 0.20 for 20%)
56
+ * @type {number}
57
+ * @memberof CreateInvoiceLineRequest
58
+ */
59
+ 'vatRate': number;
60
+ }
61
+