@origincloud/billing 0.26.0 → 0.27.0
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/dist/v1beta1/index.d.ts +1 -0
- package/dist/v1beta1/index.d.ts.map +1 -1
- package/dist/v1beta1/index.js +1 -0
- package/dist/v1beta1/index.js.map +1 -1
- package/dist/v1beta1/legal_document.d.ts +220 -0
- package/dist/v1beta1/legal_document.d.ts.map +1 -0
- package/dist/v1beta1/legal_document.js +141 -0
- package/dist/v1beta1/legal_document.js.map +1 -0
- package/package.json +3 -3
- package/src/v1beta1/index.ts +1 -0
- package/src/v1beta1/legal_document.ts +325 -0
package/dist/v1beta1/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/v1beta1/index.ts"],"names":[],"mappings":"AAEA,cAAc,sBAAsB,CAAC;AACrC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/v1beta1/index.ts"],"names":[],"mappings":"AAEA,cAAc,sBAAsB,CAAC;AACrC,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC"}
|
package/dist/v1beta1/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Code generated by the SDK's generator (generator/). DO NOT EDIT.
|
|
2
2
|
export * from "./billing_account.js";
|
|
3
3
|
export * from "./cost.js";
|
|
4
|
+
export * from "./legal_document.js";
|
|
4
5
|
export * from "./price_list.js";
|
|
5
6
|
export * from "./spend_limit.js";
|
|
6
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/v1beta1/index.ts"],"names":[],"mappings":"AAAA,mEAAmE;AAEnE,cAAc,sBAAsB,CAAC;AACrC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/v1beta1/index.ts"],"names":[],"mappings":"AAAA,mEAAmE;AAEnE,cAAc,sBAAsB,CAAC;AACrC,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { type CalendarDate, type CallOptions, type Client, type HttpBody, type Service } from "@origincloud/core";
|
|
2
|
+
/**
|
|
3
|
+
* Calls LegalDocumentService.
|
|
4
|
+
*
|
|
5
|
+
* The legal documents Origin Cloud publishes: the Terms of Service, the Data
|
|
6
|
+
* Processing Agreement, the Service Level Agreement and the Acceptable Use
|
|
7
|
+
* Policy a customer accepts, and the documents published beside them. Every
|
|
8
|
+
* version stays readable under its fixed name once it is published, and none
|
|
9
|
+
* is ever changed: a correction is a new version.
|
|
10
|
+
*
|
|
11
|
+
* Every method of this service is answered without an access token.
|
|
12
|
+
*/
|
|
13
|
+
export declare class LegalDocumentClient {
|
|
14
|
+
/**
|
|
15
|
+
* The endpoint the client sends its calls to, which also serves the
|
|
16
|
+
* operations its methods answer with.
|
|
17
|
+
*/
|
|
18
|
+
readonly service: Service;
|
|
19
|
+
/** A client of LegalDocumentService that sends its calls through `client`. */
|
|
20
|
+
constructor(client: Client);
|
|
21
|
+
/**
|
|
22
|
+
* Lists the published legal documents, in a fixed order: `terms`, `dpa`,
|
|
23
|
+
* `sla`, `aup`, `subprocessors`, `toms`, `privacy`, `switching`,
|
|
24
|
+
* `shared-responsibility`. A document with no published version yet is
|
|
25
|
+
* left out.
|
|
26
|
+
*/
|
|
27
|
+
listLegalDocuments(request: ListLegalDocumentsRequest, options?: CallOptions): Promise<ListLegalDocumentsResponse>;
|
|
28
|
+
/**
|
|
29
|
+
* Iterates over everything listLegalDocuments lists from the request's page on,
|
|
30
|
+
* fetching the next page as the loop reaches it. A page that fails ends
|
|
31
|
+
* the iteration with its error.
|
|
32
|
+
*/
|
|
33
|
+
allLegalDocuments(request: ListLegalDocumentsRequest, options?: CallOptions): AsyncGenerator<LegalDocument, void, undefined>;
|
|
34
|
+
/**
|
|
35
|
+
* Returns a legal document, with the version in force now and the latest
|
|
36
|
+
* one published. Fails with `NOT_FOUND` for a document with no published
|
|
37
|
+
* version.
|
|
38
|
+
*/
|
|
39
|
+
getLegalDocument(request: GetLegalDocumentRequest, options?: CallOptions): Promise<LegalDocument>;
|
|
40
|
+
/** Lists a legal document's published versions, the latest first. */
|
|
41
|
+
listLegalDocumentVersions(request: ListLegalDocumentVersionsRequest, options?: CallOptions): Promise<ListLegalDocumentVersionsResponse>;
|
|
42
|
+
/**
|
|
43
|
+
* Iterates over everything listLegalDocumentVersions lists from the request's page on,
|
|
44
|
+
* fetching the next page as the loop reaches it. A page that fails ends
|
|
45
|
+
* the iteration with its error.
|
|
46
|
+
*/
|
|
47
|
+
allLegalDocumentVersions(request: ListLegalDocumentVersionsRequest, options?: CallOptions): AsyncGenerator<LegalDocumentVersion, void, undefined>;
|
|
48
|
+
/** Returns one published version of a legal document, its text included. */
|
|
49
|
+
getLegalDocumentVersion(request: GetLegalDocumentVersionRequest, options?: CallOptions): Promise<LegalDocumentVersion>;
|
|
50
|
+
/**
|
|
51
|
+
* Returns a published version as a PDF (`application/pdf`), the file
|
|
52
|
+
* itself rather than JSON. Every page's footer names the document, the
|
|
53
|
+
* version, the date it takes effect and its `sha256`.
|
|
54
|
+
*
|
|
55
|
+
* It answers with the file itself: its bytes, as they came, and their content type.
|
|
56
|
+
*/
|
|
57
|
+
downloadLegalDocumentVersion(request: DownloadLegalDocumentVersionRequest, options?: CallOptions): Promise<HttpBody>;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* A legal document: every version of one kind of document, such as the Terms
|
|
61
|
+
* of Service.
|
|
62
|
+
*/
|
|
63
|
+
export interface LegalDocument {
|
|
64
|
+
/**
|
|
65
|
+
* The document's resource name, `legalDocuments/{legal_document}`, where
|
|
66
|
+
* `{legal_document}` is one of `terms`, `dpa`, `sla`, `aup`,
|
|
67
|
+
* `subprocessors`, `toms`, `privacy`, `switching` and
|
|
68
|
+
* `shared-responsibility`.
|
|
69
|
+
*/
|
|
70
|
+
name?: string;
|
|
71
|
+
/**
|
|
72
|
+
* The document's title, as its latest version names it, such as `Terms of
|
|
73
|
+
* Service`.
|
|
74
|
+
*/
|
|
75
|
+
displayName?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Whether a customer accepts this document. A `MATERIAL` version of one
|
|
78
|
+
* that is accepted needs a new acceptance; the other documents are
|
|
79
|
+
* published only.
|
|
80
|
+
*/
|
|
81
|
+
acceptanceRequired?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* The version in force today, by its resource name. Empty while the first
|
|
84
|
+
* version has not taken effect yet.
|
|
85
|
+
*/
|
|
86
|
+
currentVersion?: string;
|
|
87
|
+
/**
|
|
88
|
+
* The latest version published, by its resource name: `currentVersion`,
|
|
89
|
+
* or a version announced to take effect later.
|
|
90
|
+
*/
|
|
91
|
+
latestVersion?: string;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* One published version of a legal document. It never changes once
|
|
95
|
+
* published.
|
|
96
|
+
*/
|
|
97
|
+
export interface LegalDocumentVersion {
|
|
98
|
+
/**
|
|
99
|
+
* The version's resource name,
|
|
100
|
+
* `legalDocuments/{legal_document}/versions/{version}`, where `{version}`
|
|
101
|
+
* is `YYYY-MM`, or `YYYY-MM-2`, `YYYY-MM-3` and so on for another version
|
|
102
|
+
* in the same month.
|
|
103
|
+
*/
|
|
104
|
+
name?: string;
|
|
105
|
+
/** The version's title, such as `Terms of Service`. */
|
|
106
|
+
displayName?: string;
|
|
107
|
+
/**
|
|
108
|
+
* The day the version takes effect. It applies from that day until the
|
|
109
|
+
* next version of the document takes effect.
|
|
110
|
+
*/
|
|
111
|
+
effectiveDate?: CalendarDate;
|
|
112
|
+
/** What the version changes. */
|
|
113
|
+
changeClass?: LegalDocumentVersion_ChangeClass;
|
|
114
|
+
/**
|
|
115
|
+
* A plain-language summary of what changed, as the acceptance dialog and
|
|
116
|
+
* the announcement show it.
|
|
117
|
+
*/
|
|
118
|
+
changeSummary?: string;
|
|
119
|
+
/**
|
|
120
|
+
* The SHA-256 of `markdown`, in lowercase hexadecimal: what identifies the
|
|
121
|
+
* version, and what an acceptance of it records.
|
|
122
|
+
*/
|
|
123
|
+
sha256?: string;
|
|
124
|
+
/**
|
|
125
|
+
* The version's source, Markdown with its YAML front matter, exactly as
|
|
126
|
+
* `sha256` is computed over it.
|
|
127
|
+
*/
|
|
128
|
+
markdown?: string;
|
|
129
|
+
/**
|
|
130
|
+
* The version's text as an HTML fragment, without its title: safe to embed
|
|
131
|
+
* as it is. A reference to another legal document links the version of it
|
|
132
|
+
* in force on `effectiveDate`.
|
|
133
|
+
*/
|
|
134
|
+
html?: string;
|
|
135
|
+
/**
|
|
136
|
+
* Where the version is published on the web, under a URL that never
|
|
137
|
+
* changes, such as `https://origincloud.eu/legal/terms/2026-12`.
|
|
138
|
+
*/
|
|
139
|
+
uri?: string;
|
|
140
|
+
/** Where the version's PDF is downloaded from (DownloadLegalDocumentVersion). */
|
|
141
|
+
pdfUri?: string;
|
|
142
|
+
}
|
|
143
|
+
/** What a version changes, and so what publishing it asks of a customer. */
|
|
144
|
+
export declare const LegalDocumentVersion_ChangeClass: {
|
|
145
|
+
/** Not used. */
|
|
146
|
+
readonly CHANGE_CLASS_UNSPECIFIED: "CHANGE_CLASS_UNSPECIFIED";
|
|
147
|
+
/**
|
|
148
|
+
* Changes rights or obligations. For a document customers accept, a
|
|
149
|
+
* customer accepts this version before it applies to them, and it is
|
|
150
|
+
* announced at least six weeks before it takes effect.
|
|
151
|
+
*/
|
|
152
|
+
readonly MATERIAL: "MATERIAL";
|
|
153
|
+
/**
|
|
154
|
+
* Announced ahead and never accepted, such as a new sub-processor,
|
|
155
|
+
* announced at least 30 days before it takes effect.
|
|
156
|
+
*/
|
|
157
|
+
readonly NOTICE: "NOTICE";
|
|
158
|
+
/** Wording, corrections and formatting. Asks nothing of anyone. */
|
|
159
|
+
readonly EDITORIAL: "EDITORIAL";
|
|
160
|
+
};
|
|
161
|
+
/** What a version changes, and so what publishing it asks of a customer. */
|
|
162
|
+
export type LegalDocumentVersion_ChangeClass = (typeof LegalDocumentVersion_ChangeClass)[keyof typeof LegalDocumentVersion_ChangeClass];
|
|
163
|
+
/** The request for ListLegalDocuments. */
|
|
164
|
+
export interface ListLegalDocumentsRequest {
|
|
165
|
+
/**
|
|
166
|
+
* The most documents to return; the server clamps it, and 0 means its
|
|
167
|
+
* default.
|
|
168
|
+
*/
|
|
169
|
+
pageSize?: number;
|
|
170
|
+
/** A previous response's `nextPageToken`, for the page after it. */
|
|
171
|
+
pageToken?: string;
|
|
172
|
+
}
|
|
173
|
+
/** The response for ListLegalDocuments. */
|
|
174
|
+
export interface ListLegalDocumentsResponse {
|
|
175
|
+
/** The documents on this page. */
|
|
176
|
+
legalDocuments?: LegalDocument[];
|
|
177
|
+
/** The token for the next page; empty on the last one. */
|
|
178
|
+
nextPageToken?: string;
|
|
179
|
+
}
|
|
180
|
+
/** The request for GetLegalDocument. */
|
|
181
|
+
export interface GetLegalDocumentRequest {
|
|
182
|
+
/** The document to return, `legalDocuments/{legal_document}`. */
|
|
183
|
+
name?: string;
|
|
184
|
+
}
|
|
185
|
+
/** The request for ListLegalDocumentVersions. */
|
|
186
|
+
export interface ListLegalDocumentVersionsRequest {
|
|
187
|
+
/** The document whose versions to list, `legalDocuments/{legal_document}`. */
|
|
188
|
+
parent?: string;
|
|
189
|
+
/**
|
|
190
|
+
* The most versions to return; the server clamps it, and 0 means its
|
|
191
|
+
* default.
|
|
192
|
+
*/
|
|
193
|
+
pageSize?: number;
|
|
194
|
+
/** A previous response's `nextPageToken`, for the page after it. */
|
|
195
|
+
pageToken?: string;
|
|
196
|
+
}
|
|
197
|
+
/** The response for ListLegalDocumentVersions. */
|
|
198
|
+
export interface ListLegalDocumentVersionsResponse {
|
|
199
|
+
/** The versions on this page. */
|
|
200
|
+
legalDocumentVersions?: LegalDocumentVersion[];
|
|
201
|
+
/** The token for the next page; empty on the last one. */
|
|
202
|
+
nextPageToken?: string;
|
|
203
|
+
}
|
|
204
|
+
/** The request for GetLegalDocumentVersion. */
|
|
205
|
+
export interface GetLegalDocumentVersionRequest {
|
|
206
|
+
/**
|
|
207
|
+
* The version to return,
|
|
208
|
+
* `legalDocuments/{legal_document}/versions/{version}`.
|
|
209
|
+
*/
|
|
210
|
+
name?: string;
|
|
211
|
+
}
|
|
212
|
+
/** The request for DownloadLegalDocumentVersion. */
|
|
213
|
+
export interface DownloadLegalDocumentVersionRequest {
|
|
214
|
+
/**
|
|
215
|
+
* The version to download,
|
|
216
|
+
* `legalDocuments/{legal_document}/versions/{version}`.
|
|
217
|
+
*/
|
|
218
|
+
name?: string;
|
|
219
|
+
}
|
|
220
|
+
//# sourceMappingURL=legal_document.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legal_document.d.ts","sourceRoot":"","sources":["../../src/v1beta1/legal_document.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,OAAO,EAGb,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;;;;GAUG;AACH,qBAAa,mBAAmB;IAC9B;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAE1B,8EAA8E;gBAClE,MAAM,EAAE,MAAM;IAI1B;;;;;OAKG;IACG,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,0BAA0B,CAA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MAAM,WAAW,iCAAiC;IAChD,iCAAiC;IACjC,qBAAqB,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAC/C,0DAA0D;IAC1D,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,+CAA+C;AAC/C,MAAM,WAAW,8BAA8B;IAC7C;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,oDAAoD;AACpD,MAAM,WAAW,mCAAmC;IAClD;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
// Code generated by the SDK's generator (generator/). DO NOT EDIT.
|
|
2
|
+
// source: origincloud/billing/v1beta1/legal_document.proto
|
|
3
|
+
import { pathValue, query, } from "@origincloud/core";
|
|
4
|
+
/**
|
|
5
|
+
* Calls LegalDocumentService.
|
|
6
|
+
*
|
|
7
|
+
* The legal documents Origin Cloud publishes: the Terms of Service, the Data
|
|
8
|
+
* Processing Agreement, the Service Level Agreement and the Acceptable Use
|
|
9
|
+
* Policy a customer accepts, and the documents published beside them. Every
|
|
10
|
+
* version stays readable under its fixed name once it is published, and none
|
|
11
|
+
* is ever changed: a correction is a new version.
|
|
12
|
+
*
|
|
13
|
+
* Every method of this service is answered without an access token.
|
|
14
|
+
*/
|
|
15
|
+
export class LegalDocumentClient {
|
|
16
|
+
/**
|
|
17
|
+
* The endpoint the client sends its calls to, which also serves the
|
|
18
|
+
* operations its methods answer with.
|
|
19
|
+
*/
|
|
20
|
+
service;
|
|
21
|
+
/** A client of LegalDocumentService that sends its calls through `client`. */
|
|
22
|
+
constructor(client) {
|
|
23
|
+
this.service = client.service("billing", false);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Lists the published legal documents, in a fixed order: `terms`, `dpa`,
|
|
27
|
+
* `sla`, `aup`, `subprocessors`, `toms`, `privacy`, `switching`,
|
|
28
|
+
* `shared-responsibility`. A document with no published version yet is
|
|
29
|
+
* left out.
|
|
30
|
+
*/
|
|
31
|
+
async listLegalDocuments(request, options) {
|
|
32
|
+
return this.service.call({
|
|
33
|
+
method: "GET",
|
|
34
|
+
path: `/v1beta1/legalDocuments`,
|
|
35
|
+
query: query(request, []),
|
|
36
|
+
idempotent: true,
|
|
37
|
+
unauthenticated: true,
|
|
38
|
+
}, options);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Iterates over everything listLegalDocuments lists from the request's page on,
|
|
42
|
+
* fetching the next page as the loop reaches it. A page that fails ends
|
|
43
|
+
* the iteration with its error.
|
|
44
|
+
*/
|
|
45
|
+
async *allLegalDocuments(request, options) {
|
|
46
|
+
for (let page = request;;) {
|
|
47
|
+
const response = await this.listLegalDocuments(page, options);
|
|
48
|
+
yield* response.legalDocuments ?? [];
|
|
49
|
+
if (!response.nextPageToken)
|
|
50
|
+
return;
|
|
51
|
+
page = { ...page, pageToken: response.nextPageToken };
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Returns a legal document, with the version in force now and the latest
|
|
56
|
+
* one published. Fails with `NOT_FOUND` for a document with no published
|
|
57
|
+
* version.
|
|
58
|
+
*/
|
|
59
|
+
async getLegalDocument(request, options) {
|
|
60
|
+
const p0 = pathValue("name", request.name, "legalDocuments/*");
|
|
61
|
+
return this.service.call({
|
|
62
|
+
method: "GET",
|
|
63
|
+
path: `/v1beta1/${p0}`,
|
|
64
|
+
query: query(request, ["name"]),
|
|
65
|
+
idempotent: true,
|
|
66
|
+
unauthenticated: true,
|
|
67
|
+
}, options);
|
|
68
|
+
}
|
|
69
|
+
/** Lists a legal document's published versions, the latest first. */
|
|
70
|
+
async listLegalDocumentVersions(request, options) {
|
|
71
|
+
const p0 = pathValue("parent", request.parent, "legalDocuments/*");
|
|
72
|
+
return this.service.call({
|
|
73
|
+
method: "GET",
|
|
74
|
+
path: `/v1beta1/${p0}/versions`,
|
|
75
|
+
query: query(request, ["parent"]),
|
|
76
|
+
idempotent: true,
|
|
77
|
+
unauthenticated: true,
|
|
78
|
+
}, options);
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Iterates over everything listLegalDocumentVersions lists from the request's page on,
|
|
82
|
+
* fetching the next page as the loop reaches it. A page that fails ends
|
|
83
|
+
* the iteration with its error.
|
|
84
|
+
*/
|
|
85
|
+
async *allLegalDocumentVersions(request, options) {
|
|
86
|
+
for (let page = request;;) {
|
|
87
|
+
const response = await this.listLegalDocumentVersions(page, options);
|
|
88
|
+
yield* response.legalDocumentVersions ?? [];
|
|
89
|
+
if (!response.nextPageToken)
|
|
90
|
+
return;
|
|
91
|
+
page = { ...page, pageToken: response.nextPageToken };
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/** Returns one published version of a legal document, its text included. */
|
|
95
|
+
async getLegalDocumentVersion(request, options) {
|
|
96
|
+
const p0 = pathValue("name", request.name, "legalDocuments/*/versions/*");
|
|
97
|
+
return this.service.call({
|
|
98
|
+
method: "GET",
|
|
99
|
+
path: `/v1beta1/${p0}`,
|
|
100
|
+
query: query(request, ["name"]),
|
|
101
|
+
idempotent: true,
|
|
102
|
+
unauthenticated: true,
|
|
103
|
+
}, options);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Returns a published version as a PDF (`application/pdf`), the file
|
|
107
|
+
* itself rather than JSON. Every page's footer names the document, the
|
|
108
|
+
* version, the date it takes effect and its `sha256`.
|
|
109
|
+
*
|
|
110
|
+
* It answers with the file itself: its bytes, as they came, and their content type.
|
|
111
|
+
*/
|
|
112
|
+
async downloadLegalDocumentVersion(request, options) {
|
|
113
|
+
const p0 = pathValue("name", request.name, "legalDocuments/*/versions/*");
|
|
114
|
+
return this.service.download({
|
|
115
|
+
method: "GET",
|
|
116
|
+
path: `/v1beta1/${p0}:download`,
|
|
117
|
+
query: query(request, ["name"]),
|
|
118
|
+
idempotent: true,
|
|
119
|
+
unauthenticated: true,
|
|
120
|
+
}, options);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
/** What a version changes, and so what publishing it asks of a customer. */
|
|
124
|
+
export const LegalDocumentVersion_ChangeClass = {
|
|
125
|
+
/** Not used. */
|
|
126
|
+
CHANGE_CLASS_UNSPECIFIED: "CHANGE_CLASS_UNSPECIFIED",
|
|
127
|
+
/**
|
|
128
|
+
* Changes rights or obligations. For a document customers accept, a
|
|
129
|
+
* customer accepts this version before it applies to them, and it is
|
|
130
|
+
* announced at least six weeks before it takes effect.
|
|
131
|
+
*/
|
|
132
|
+
MATERIAL: "MATERIAL",
|
|
133
|
+
/**
|
|
134
|
+
* Announced ahead and never accepted, such as a new sub-processor,
|
|
135
|
+
* announced at least 30 days before it takes effect.
|
|
136
|
+
*/
|
|
137
|
+
NOTICE: "NOTICE",
|
|
138
|
+
/** Wording, corrections and formatting. Asks nothing of anyone. */
|
|
139
|
+
EDITORIAL: "EDITORIAL",
|
|
140
|
+
};
|
|
141
|
+
//# sourceMappingURL=legal_document.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legal_document.js","sourceRoot":"","sources":["../../src/v1beta1/legal_document.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,2DAA2D;AAE3D,OAAO,EAML,SAAS,EACT,KAAK,GACN,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;;;;GAUG;AACH,MAAM,OAAO,mBAAmB;IAC9B;;;OAGG;IACM,OAAO,CAAU;IAE1B,8EAA8E;IAC9E,YAAY,MAAc;QACxB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAClD,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,kBAAkB,CAAC,OAAkC,EAAE,OAAqB;QAChF,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB;YACE,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,yBAAyB;YAC/B,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;YACzB,UAA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,YAAY,EAAE,WAAW;YAC/B,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC;YAC/B,UAAU,EAAE,IAAI;YAChB,eAAe,EAAE,IAAI;SACtB,EACD,OAAO,CACR,CAAC;IACJ,CAAC;CACF;AAwFD,4EAA4E;AAC5E,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,gBAAgB;IAChB,wBAAwB,EAAE,0BAA0B;IACpD;;;;OAIG;IACH,QAAQ,EAAE,UAAU;IACpB;;;OAGG;IACH,MAAM,EAAE,QAAQ;IAChB,mEAAmE;IACnE,SAAS,EAAE,WAAW;CACd,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@origincloud/billing",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
4
4
|
"description": "Origin Cloud's billing service: billing accounts and the projects they pay for, payment methods, cost and usage, spend limits and the price list.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/origincloudhq/sdk-typescript#readme",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"!dist/**/*.tsbuildinfo"
|
|
35
35
|
],
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"@origincloud/core": "^0.
|
|
37
|
+
"@origincloud/core": "^0.27.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@origincloud/core": "^0.
|
|
40
|
+
"@origincloud/core": "^0.27.0"
|
|
41
41
|
}
|
|
42
42
|
}
|
package/src/v1beta1/index.ts
CHANGED
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
// Code generated by the SDK's generator (generator/). DO NOT EDIT.
|
|
2
|
+
// source: origincloud/billing/v1beta1/legal_document.proto
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
type CalendarDate,
|
|
6
|
+
type CallOptions,
|
|
7
|
+
type Client,
|
|
8
|
+
type HttpBody,
|
|
9
|
+
type Service,
|
|
10
|
+
pathValue,
|
|
11
|
+
query,
|
|
12
|
+
} from "@origincloud/core";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Calls LegalDocumentService.
|
|
16
|
+
*
|
|
17
|
+
* The legal documents Origin Cloud publishes: the Terms of Service, the Data
|
|
18
|
+
* Processing Agreement, the Service Level Agreement and the Acceptable Use
|
|
19
|
+
* Policy a customer accepts, and the documents published beside them. Every
|
|
20
|
+
* version stays readable under its fixed name once it is published, and none
|
|
21
|
+
* is ever changed: a correction is a new version.
|
|
22
|
+
*
|
|
23
|
+
* Every method of this service is answered without an access token.
|
|
24
|
+
*/
|
|
25
|
+
export class LegalDocumentClient {
|
|
26
|
+
/**
|
|
27
|
+
* The endpoint the client sends its calls to, which also serves the
|
|
28
|
+
* operations its methods answer with.
|
|
29
|
+
*/
|
|
30
|
+
readonly service: Service;
|
|
31
|
+
|
|
32
|
+
/** A client of LegalDocumentService that sends its calls through `client`. */
|
|
33
|
+
constructor(client: Client) {
|
|
34
|
+
this.service = client.service("billing", false);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Lists the published legal documents, in a fixed order: `terms`, `dpa`,
|
|
39
|
+
* `sla`, `aup`, `subprocessors`, `toms`, `privacy`, `switching`,
|
|
40
|
+
* `shared-responsibility`. A document with no published version yet is
|
|
41
|
+
* left out.
|
|
42
|
+
*/
|
|
43
|
+
async listLegalDocuments(request: ListLegalDocumentsRequest, options?: CallOptions): Promise<ListLegalDocumentsResponse> {
|
|
44
|
+
return this.service.call<ListLegalDocumentsResponse>(
|
|
45
|
+
{
|
|
46
|
+
method: "GET",
|
|
47
|
+
path: `/v1beta1/legalDocuments`,
|
|
48
|
+
query: query(request, []),
|
|
49
|
+
idempotent: true,
|
|
50
|
+
unauthenticated: true,
|
|
51
|
+
},
|
|
52
|
+
options,
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Iterates over everything listLegalDocuments lists from the request's page on,
|
|
58
|
+
* fetching the next page as the loop reaches it. A page that fails ends
|
|
59
|
+
* the iteration with its error.
|
|
60
|
+
*/
|
|
61
|
+
async *allLegalDocuments(request: ListLegalDocumentsRequest, options?: CallOptions): AsyncGenerator<LegalDocument, void, undefined> {
|
|
62
|
+
for (let page = request; ; ) {
|
|
63
|
+
const response = await this.listLegalDocuments(page, options);
|
|
64
|
+
yield* response.legalDocuments ?? [];
|
|
65
|
+
if (!response.nextPageToken) return;
|
|
66
|
+
page = { ...page, pageToken: response.nextPageToken };
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Returns a legal document, with the version in force now and the latest
|
|
72
|
+
* one published. Fails with `NOT_FOUND` for a document with no published
|
|
73
|
+
* version.
|
|
74
|
+
*/
|
|
75
|
+
async getLegalDocument(request: GetLegalDocumentRequest, options?: CallOptions): Promise<LegalDocument> {
|
|
76
|
+
const p0 = pathValue("name", request.name, "legalDocuments/*");
|
|
77
|
+
return this.service.call<LegalDocument>(
|
|
78
|
+
{
|
|
79
|
+
method: "GET",
|
|
80
|
+
path: `/v1beta1/${p0}`,
|
|
81
|
+
query: query(request, ["name"]),
|
|
82
|
+
idempotent: true,
|
|
83
|
+
unauthenticated: true,
|
|
84
|
+
},
|
|
85
|
+
options,
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/** Lists a legal document's published versions, the latest first. */
|
|
90
|
+
async listLegalDocumentVersions(request: ListLegalDocumentVersionsRequest, options?: CallOptions): Promise<ListLegalDocumentVersionsResponse> {
|
|
91
|
+
const p0 = pathValue("parent", request.parent, "legalDocuments/*");
|
|
92
|
+
return this.service.call<ListLegalDocumentVersionsResponse>(
|
|
93
|
+
{
|
|
94
|
+
method: "GET",
|
|
95
|
+
path: `/v1beta1/${p0}/versions`,
|
|
96
|
+
query: query(request, ["parent"]),
|
|
97
|
+
idempotent: true,
|
|
98
|
+
unauthenticated: true,
|
|
99
|
+
},
|
|
100
|
+
options,
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Iterates over everything listLegalDocumentVersions lists from the request's page on,
|
|
106
|
+
* fetching the next page as the loop reaches it. A page that fails ends
|
|
107
|
+
* the iteration with its error.
|
|
108
|
+
*/
|
|
109
|
+
async *allLegalDocumentVersions(request: ListLegalDocumentVersionsRequest, options?: CallOptions): AsyncGenerator<LegalDocumentVersion, void, undefined> {
|
|
110
|
+
for (let page = request; ; ) {
|
|
111
|
+
const response = await this.listLegalDocumentVersions(page, options);
|
|
112
|
+
yield* response.legalDocumentVersions ?? [];
|
|
113
|
+
if (!response.nextPageToken) return;
|
|
114
|
+
page = { ...page, pageToken: response.nextPageToken };
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/** Returns one published version of a legal document, its text included. */
|
|
119
|
+
async getLegalDocumentVersion(request: GetLegalDocumentVersionRequest, options?: CallOptions): Promise<LegalDocumentVersion> {
|
|
120
|
+
const p0 = pathValue("name", request.name, "legalDocuments/*/versions/*");
|
|
121
|
+
return this.service.call<LegalDocumentVersion>(
|
|
122
|
+
{
|
|
123
|
+
method: "GET",
|
|
124
|
+
path: `/v1beta1/${p0}`,
|
|
125
|
+
query: query(request, ["name"]),
|
|
126
|
+
idempotent: true,
|
|
127
|
+
unauthenticated: true,
|
|
128
|
+
},
|
|
129
|
+
options,
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Returns a published version as a PDF (`application/pdf`), the file
|
|
135
|
+
* itself rather than JSON. Every page's footer names the document, the
|
|
136
|
+
* version, the date it takes effect and its `sha256`.
|
|
137
|
+
*
|
|
138
|
+
* It answers with the file itself: its bytes, as they came, and their content type.
|
|
139
|
+
*/
|
|
140
|
+
async downloadLegalDocumentVersion(request: DownloadLegalDocumentVersionRequest, options?: CallOptions): Promise<HttpBody> {
|
|
141
|
+
const p0 = pathValue("name", request.name, "legalDocuments/*/versions/*");
|
|
142
|
+
return this.service.download(
|
|
143
|
+
{
|
|
144
|
+
method: "GET",
|
|
145
|
+
path: `/v1beta1/${p0}:download`,
|
|
146
|
+
query: query(request, ["name"]),
|
|
147
|
+
idempotent: true,
|
|
148
|
+
unauthenticated: true,
|
|
149
|
+
},
|
|
150
|
+
options,
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* A legal document: every version of one kind of document, such as the Terms
|
|
157
|
+
* of Service.
|
|
158
|
+
*/
|
|
159
|
+
export interface LegalDocument {
|
|
160
|
+
/**
|
|
161
|
+
* The document's resource name, `legalDocuments/{legal_document}`, where
|
|
162
|
+
* `{legal_document}` is one of `terms`, `dpa`, `sla`, `aup`,
|
|
163
|
+
* `subprocessors`, `toms`, `privacy`, `switching` and
|
|
164
|
+
* `shared-responsibility`.
|
|
165
|
+
*/
|
|
166
|
+
name?: string;
|
|
167
|
+
/**
|
|
168
|
+
* The document's title, as its latest version names it, such as `Terms of
|
|
169
|
+
* Service`.
|
|
170
|
+
*/
|
|
171
|
+
displayName?: string;
|
|
172
|
+
/**
|
|
173
|
+
* Whether a customer accepts this document. A `MATERIAL` version of one
|
|
174
|
+
* that is accepted needs a new acceptance; the other documents are
|
|
175
|
+
* published only.
|
|
176
|
+
*/
|
|
177
|
+
acceptanceRequired?: boolean;
|
|
178
|
+
/**
|
|
179
|
+
* The version in force today, by its resource name. Empty while the first
|
|
180
|
+
* version has not taken effect yet.
|
|
181
|
+
*/
|
|
182
|
+
currentVersion?: string;
|
|
183
|
+
/**
|
|
184
|
+
* The latest version published, by its resource name: `currentVersion`,
|
|
185
|
+
* or a version announced to take effect later.
|
|
186
|
+
*/
|
|
187
|
+
latestVersion?: string;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* One published version of a legal document. It never changes once
|
|
192
|
+
* published.
|
|
193
|
+
*/
|
|
194
|
+
export interface LegalDocumentVersion {
|
|
195
|
+
/**
|
|
196
|
+
* The version's resource name,
|
|
197
|
+
* `legalDocuments/{legal_document}/versions/{version}`, where `{version}`
|
|
198
|
+
* is `YYYY-MM`, or `YYYY-MM-2`, `YYYY-MM-3` and so on for another version
|
|
199
|
+
* in the same month.
|
|
200
|
+
*/
|
|
201
|
+
name?: string;
|
|
202
|
+
/** The version's title, such as `Terms of Service`. */
|
|
203
|
+
displayName?: string;
|
|
204
|
+
/**
|
|
205
|
+
* The day the version takes effect. It applies from that day until the
|
|
206
|
+
* next version of the document takes effect.
|
|
207
|
+
*/
|
|
208
|
+
effectiveDate?: CalendarDate;
|
|
209
|
+
/** What the version changes. */
|
|
210
|
+
changeClass?: LegalDocumentVersion_ChangeClass;
|
|
211
|
+
/**
|
|
212
|
+
* A plain-language summary of what changed, as the acceptance dialog and
|
|
213
|
+
* the announcement show it.
|
|
214
|
+
*/
|
|
215
|
+
changeSummary?: string;
|
|
216
|
+
/**
|
|
217
|
+
* The SHA-256 of `markdown`, in lowercase hexadecimal: what identifies the
|
|
218
|
+
* version, and what an acceptance of it records.
|
|
219
|
+
*/
|
|
220
|
+
sha256?: string;
|
|
221
|
+
/**
|
|
222
|
+
* The version's source, Markdown with its YAML front matter, exactly as
|
|
223
|
+
* `sha256` is computed over it.
|
|
224
|
+
*/
|
|
225
|
+
markdown?: string;
|
|
226
|
+
/**
|
|
227
|
+
* The version's text as an HTML fragment, without its title: safe to embed
|
|
228
|
+
* as it is. A reference to another legal document links the version of it
|
|
229
|
+
* in force on `effectiveDate`.
|
|
230
|
+
*/
|
|
231
|
+
html?: string;
|
|
232
|
+
/**
|
|
233
|
+
* Where the version is published on the web, under a URL that never
|
|
234
|
+
* changes, such as `https://origincloud.eu/legal/terms/2026-12`.
|
|
235
|
+
*/
|
|
236
|
+
uri?: string;
|
|
237
|
+
/** Where the version's PDF is downloaded from (DownloadLegalDocumentVersion). */
|
|
238
|
+
pdfUri?: string;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/** What a version changes, and so what publishing it asks of a customer. */
|
|
242
|
+
export const LegalDocumentVersion_ChangeClass = {
|
|
243
|
+
/** Not used. */
|
|
244
|
+
CHANGE_CLASS_UNSPECIFIED: "CHANGE_CLASS_UNSPECIFIED",
|
|
245
|
+
/**
|
|
246
|
+
* Changes rights or obligations. For a document customers accept, a
|
|
247
|
+
* customer accepts this version before it applies to them, and it is
|
|
248
|
+
* announced at least six weeks before it takes effect.
|
|
249
|
+
*/
|
|
250
|
+
MATERIAL: "MATERIAL",
|
|
251
|
+
/**
|
|
252
|
+
* Announced ahead and never accepted, such as a new sub-processor,
|
|
253
|
+
* announced at least 30 days before it takes effect.
|
|
254
|
+
*/
|
|
255
|
+
NOTICE: "NOTICE",
|
|
256
|
+
/** Wording, corrections and formatting. Asks nothing of anyone. */
|
|
257
|
+
EDITORIAL: "EDITORIAL",
|
|
258
|
+
} as const;
|
|
259
|
+
|
|
260
|
+
/** What a version changes, and so what publishing it asks of a customer. */
|
|
261
|
+
export type LegalDocumentVersion_ChangeClass = (typeof LegalDocumentVersion_ChangeClass)[keyof typeof LegalDocumentVersion_ChangeClass];
|
|
262
|
+
|
|
263
|
+
/** The request for ListLegalDocuments. */
|
|
264
|
+
export interface ListLegalDocumentsRequest {
|
|
265
|
+
/**
|
|
266
|
+
* The most documents to return; the server clamps it, and 0 means its
|
|
267
|
+
* default.
|
|
268
|
+
*/
|
|
269
|
+
pageSize?: number;
|
|
270
|
+
/** A previous response's `nextPageToken`, for the page after it. */
|
|
271
|
+
pageToken?: string;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/** The response for ListLegalDocuments. */
|
|
275
|
+
export interface ListLegalDocumentsResponse {
|
|
276
|
+
/** The documents on this page. */
|
|
277
|
+
legalDocuments?: LegalDocument[];
|
|
278
|
+
/** The token for the next page; empty on the last one. */
|
|
279
|
+
nextPageToken?: string;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/** The request for GetLegalDocument. */
|
|
283
|
+
export interface GetLegalDocumentRequest {
|
|
284
|
+
/** The document to return, `legalDocuments/{legal_document}`. */
|
|
285
|
+
name?: string;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/** The request for ListLegalDocumentVersions. */
|
|
289
|
+
export interface ListLegalDocumentVersionsRequest {
|
|
290
|
+
/** The document whose versions to list, `legalDocuments/{legal_document}`. */
|
|
291
|
+
parent?: string;
|
|
292
|
+
/**
|
|
293
|
+
* The most versions to return; the server clamps it, and 0 means its
|
|
294
|
+
* default.
|
|
295
|
+
*/
|
|
296
|
+
pageSize?: number;
|
|
297
|
+
/** A previous response's `nextPageToken`, for the page after it. */
|
|
298
|
+
pageToken?: string;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/** The response for ListLegalDocumentVersions. */
|
|
302
|
+
export interface ListLegalDocumentVersionsResponse {
|
|
303
|
+
/** The versions on this page. */
|
|
304
|
+
legalDocumentVersions?: LegalDocumentVersion[];
|
|
305
|
+
/** The token for the next page; empty on the last one. */
|
|
306
|
+
nextPageToken?: string;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/** The request for GetLegalDocumentVersion. */
|
|
310
|
+
export interface GetLegalDocumentVersionRequest {
|
|
311
|
+
/**
|
|
312
|
+
* The version to return,
|
|
313
|
+
* `legalDocuments/{legal_document}/versions/{version}`.
|
|
314
|
+
*/
|
|
315
|
+
name?: string;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/** The request for DownloadLegalDocumentVersion. */
|
|
319
|
+
export interface DownloadLegalDocumentVersionRequest {
|
|
320
|
+
/**
|
|
321
|
+
* The version to download,
|
|
322
|
+
* `legalDocuments/{legal_document}/versions/{version}`.
|
|
323
|
+
*/
|
|
324
|
+
name?: string;
|
|
325
|
+
}
|