pingen2-sdk-js 0.1.2 → 0.3.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/README.md +1 -1
- package/dist/index.d.mts +845 -0
- package/dist/index.d.ts +845 -12
- package/dist/index.js +1222 -59
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1137 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +16 -3
- package/dist/client.d.ts +0 -30
- package/dist/client.d.ts.map +0 -1
- package/dist/client.js +0 -72
- package/dist/client.js.map +0 -1
- package/dist/common/enums/address-position.d.ts +0 -5
- package/dist/common/enums/address-position.d.ts.map +0 -1
- package/dist/common/enums/address-position.js +0 -9
- package/dist/common/enums/address-position.js.map +0 -1
- package/dist/common/enums/delivery-product.d.ts +0 -8
- package/dist/common/enums/delivery-product.d.ts.map +0 -1
- package/dist/common/enums/delivery-product.js +0 -12
- package/dist/common/enums/delivery-product.js.map +0 -1
- package/dist/common/enums/index.d.ts +0 -6
- package/dist/common/enums/index.d.ts.map +0 -1
- package/dist/common/enums/index.js +0 -14
- package/dist/common/enums/index.js.map +0 -1
- package/dist/common/enums/paper-type.d.ts +0 -7
- package/dist/common/enums/paper-type.d.ts.map +0 -1
- package/dist/common/enums/paper-type.js +0 -11
- package/dist/common/enums/paper-type.js.map +0 -1
- package/dist/common/enums/print-mode.d.ts +0 -5
- package/dist/common/enums/print-mode.d.ts.map +0 -1
- package/dist/common/enums/print-mode.js +0 -9
- package/dist/common/enums/print-mode.js.map +0 -1
- package/dist/common/enums/print-spectrum.d.ts +0 -5
- package/dist/common/enums/print-spectrum.d.ts.map +0 -1
- package/dist/common/enums/print-spectrum.js +0 -9
- package/dist/common/enums/print-spectrum.js.map +0 -1
- package/dist/common/index.d.ts +0 -8
- package/dist/common/index.d.ts.map +0 -1
- package/dist/common/index.js +0 -24
- package/dist/common/index.js.map +0 -1
- package/dist/common/json-api.d.ts +0 -37
- package/dist/common/json-api.d.ts.map +0 -1
- package/dist/common/json-api.js +0 -3
- package/dist/common/json-api.js.map +0 -1
- package/dist/common/preset.d.ts +0 -13
- package/dist/common/preset.d.ts.map +0 -1
- package/dist/common/preset.js +0 -20
- package/dist/common/preset.js.map +0 -1
- package/dist/common/relationships.d.ts +0 -20
- package/dist/common/relationships.d.ts.map +0 -1
- package/dist/common/relationships.js +0 -3
- package/dist/common/relationships.js.map +0 -1
- package/dist/common/response.d.ts +0 -12
- package/dist/common/response.d.ts.map +0 -1
- package/dist/common/response.js +0 -77
- package/dist/common/response.js.map +0 -1
- package/dist/common/typed-response.d.ts +0 -29
- package/dist/common/typed-response.d.ts.map +0 -1
- package/dist/common/typed-response.js +0 -3
- package/dist/common/typed-response.js.map +0 -1
- package/dist/common/webhook-event.d.ts +0 -34
- package/dist/common/webhook-event.d.ts.map +0 -1
- package/dist/common/webhook-event.js +0 -3
- package/dist/common/webhook-event.js.map +0 -1
- package/dist/constants.d.ts +0 -10
- package/dist/constants.d.ts.map +0 -1
- package/dist/constants.js +0 -16
- package/dist/constants.js.map +0 -1
- package/dist/errors.d.ts +0 -50
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js +0 -115
- package/dist/errors.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/oauth.d.ts +0 -17
- package/dist/oauth.d.ts.map +0 -1
- package/dist/oauth.js +0 -68
- package/dist/oauth.js.map +0 -1
- package/dist/requestor.d.ts +0 -28
- package/dist/requestor.d.ts.map +0 -1
- package/dist/requestor.js +0 -163
- package/dist/requestor.js.map +0 -1
- package/dist/resources/base.d.ts +0 -19
- package/dist/resources/base.d.ts.map +0 -1
- package/dist/resources/base.js +0 -40
- package/dist/resources/base.js.map +0 -1
- package/dist/resources/batches/batches.d.ts +0 -15
- package/dist/resources/batches/batches.d.ts.map +0 -1
- package/dist/resources/batches/batches.js +0 -68
- package/dist/resources/batches/batches.js.map +0 -1
- package/dist/resources/batches/enums.d.ts +0 -39
- package/dist/resources/batches/enums.d.ts.map +0 -1
- package/dist/resources/batches/enums.js +0 -44
- package/dist/resources/batches/enums.js.map +0 -1
- package/dist/resources/batches/response.d.ts +0 -27
- package/dist/resources/batches/response.d.ts.map +0 -1
- package/dist/resources/batches/response.js +0 -3
- package/dist/resources/batches/response.js.map +0 -1
- package/dist/resources/batches/types.d.ts +0 -41
- package/dist/resources/batches/types.d.ts.map +0 -1
- package/dist/resources/batches/types.js +0 -3
- package/dist/resources/batches/types.js.map +0 -1
- package/dist/resources/ebills/ebills.d.ts +0 -13
- package/dist/resources/ebills/ebills.d.ts.map +0 -1
- package/dist/resources/ebills/ebills.js +0 -38
- package/dist/resources/ebills/ebills.js.map +0 -1
- package/dist/resources/ebills/response.d.ts +0 -27
- package/dist/resources/ebills/response.d.ts.map +0 -1
- package/dist/resources/ebills/response.js +0 -3
- package/dist/resources/ebills/response.js.map +0 -1
- package/dist/resources/ebills/types.d.ts +0 -23
- package/dist/resources/ebills/types.d.ts.map +0 -1
- package/dist/resources/ebills/types.js +0 -3
- package/dist/resources/ebills/types.js.map +0 -1
- package/dist/resources/emails/emails.d.ts +0 -13
- package/dist/resources/emails/emails.d.ts.map +0 -1
- package/dist/resources/emails/emails.js +0 -38
- package/dist/resources/emails/emails.js.map +0 -1
- package/dist/resources/emails/response.d.ts +0 -24
- package/dist/resources/emails/response.d.ts.map +0 -1
- package/dist/resources/emails/response.js +0 -3
- package/dist/resources/emails/response.js.map +0 -1
- package/dist/resources/emails/types.d.ts +0 -26
- package/dist/resources/emails/types.d.ts.map +0 -1
- package/dist/resources/emails/types.js +0 -3
- package/dist/resources/emails/types.js.map +0 -1
- package/dist/resources/events/batch-events.d.ts +0 -6
- package/dist/resources/events/batch-events.d.ts.map +0 -1
- package/dist/resources/events/batch-events.js +0 -11
- package/dist/resources/events/batch-events.js.map +0 -1
- package/dist/resources/events/ebill-events.d.ts +0 -6
- package/dist/resources/events/ebill-events.d.ts.map +0 -1
- package/dist/resources/events/ebill-events.js +0 -11
- package/dist/resources/events/ebill-events.js.map +0 -1
- package/dist/resources/events/email-events.d.ts +0 -6
- package/dist/resources/events/email-events.d.ts.map +0 -1
- package/dist/resources/events/email-events.js +0 -11
- package/dist/resources/events/email-events.js.map +0 -1
- package/dist/resources/events/letter-events.d.ts +0 -11
- package/dist/resources/events/letter-events.d.ts.map +0 -1
- package/dist/resources/events/letter-events.js +0 -26
- package/dist/resources/events/letter-events.js.map +0 -1
- package/dist/resources/events/response.d.ts +0 -20
- package/dist/resources/events/response.d.ts.map +0 -1
- package/dist/resources/events/response.js +0 -3
- package/dist/resources/events/response.js.map +0 -1
- package/dist/resources/file-upload.d.ts +0 -17
- package/dist/resources/file-upload.d.ts.map +0 -1
- package/dist/resources/file-upload.js +0 -24
- package/dist/resources/file-upload.js.map +0 -1
- package/dist/resources/index.d.ts +0 -30
- package/dist/resources/index.d.ts.map +0 -1
- package/dist/resources/index.js +0 -58
- package/dist/resources/index.js.map +0 -1
- package/dist/resources/letters/letters.d.ts +0 -18
- package/dist/resources/letters/letters.d.ts.map +0 -1
- package/dist/resources/letters/letters.js +0 -88
- package/dist/resources/letters/letters.js.map +0 -1
- package/dist/resources/letters/response.d.ts +0 -35
- package/dist/resources/letters/response.d.ts.map +0 -1
- package/dist/resources/letters/response.js +0 -3
- package/dist/resources/letters/response.js.map +0 -1
- package/dist/resources/letters/types.d.ts +0 -61
- package/dist/resources/letters/types.d.ts.map +0 -1
- package/dist/resources/letters/types.js +0 -3
- package/dist/resources/letters/types.js.map +0 -1
- package/dist/resources/organisations/organisations.d.ts +0 -7
- package/dist/resources/organisations/organisations.d.ts.map +0 -1
- package/dist/resources/organisations/organisations.js +0 -14
- package/dist/resources/organisations/organisations.js.map +0 -1
- package/dist/resources/organisations/response.d.ts +0 -24
- package/dist/resources/organisations/response.d.ts.map +0 -1
- package/dist/resources/organisations/response.js +0 -3
- package/dist/resources/organisations/response.js.map +0 -1
- package/dist/resources/users/response.d.ts +0 -21
- package/dist/resources/users/response.d.ts.map +0 -1
- package/dist/resources/users/response.js +0 -3
- package/dist/resources/users/response.js.map +0 -1
- package/dist/resources/users/user-associations.d.ts +0 -6
- package/dist/resources/users/user-associations.d.ts.map +0 -1
- package/dist/resources/users/user-associations.js +0 -11
- package/dist/resources/users/user-associations.js.map +0 -1
- package/dist/resources/users/users.d.ts +0 -6
- package/dist/resources/users/users.d.ts.map +0 -1
- package/dist/resources/users/users.js +0 -11
- package/dist/resources/users/users.js.map +0 -1
- package/dist/resources/webhooks/enums.d.ts +0 -8
- package/dist/resources/webhooks/enums.d.ts.map +0 -1
- package/dist/resources/webhooks/enums.js +0 -12
- package/dist/resources/webhooks/enums.js.map +0 -1
- package/dist/resources/webhooks/response.d.ts +0 -8
- package/dist/resources/webhooks/response.d.ts.map +0 -1
- package/dist/resources/webhooks/response.js +0 -3
- package/dist/resources/webhooks/response.js.map +0 -1
- package/dist/resources/webhooks/types.d.ts +0 -7
- package/dist/resources/webhooks/types.d.ts.map +0 -1
- package/dist/resources/webhooks/types.js +0 -3
- package/dist/resources/webhooks/types.js.map +0 -1
- package/dist/resources/webhooks/webhooks.d.ts +0 -10
- package/dist/resources/webhooks/webhooks.d.ts.map +0 -1
- package/dist/resources/webhooks/webhooks.js +0 -24
- package/dist/resources/webhooks/webhooks.js.map +0 -1
- package/dist/utils/headers.d.ts +0 -2
- package/dist/utils/headers.d.ts.map +0 -1
- package/dist/utils/headers.js +0 -13
- package/dist/utils/headers.js.map +0 -1
- package/dist/utils/idempotency.d.ts +0 -2
- package/dist/utils/idempotency.d.ts.map +0 -1
- package/dist/utils/idempotency.js +0 -8
- package/dist/utils/idempotency.js.map +0 -1
- package/dist/utils/object.d.ts +0 -2
- package/dist/utils/object.d.ts.map +0 -1
- package/dist/utils/object.js +0 -17
- package/dist/utils/object.js.map +0 -1
- package/dist/utils/payload.d.ts +0 -8
- package/dist/utils/payload.d.ts.map +0 -1
- package/dist/utils/payload.js +0 -20
- package/dist/utils/payload.js.map +0 -1
- package/dist/utils/retry.d.ts +0 -6
- package/dist/utils/retry.d.ts.map +0 -1
- package/dist/utils/retry.js +0 -45
- package/dist/utils/retry.js.map +0 -1
- package/dist/webhook.d.ts +0 -7
- package/dist/webhook.d.ts.map +0 -1
- package/dist/webhook.js +0 -25
- package/dist/webhook.js.map +0 -1
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { RelationshipItem, RelationshipMany } from '../../common/relationships';
|
|
2
|
-
export interface FontInfo {
|
|
3
|
-
name: string;
|
|
4
|
-
is_embedded: boolean;
|
|
5
|
-
}
|
|
6
|
-
export interface LetterAttributes {
|
|
7
|
-
status?: string;
|
|
8
|
-
file_original_name?: string;
|
|
9
|
-
file_pages?: number;
|
|
10
|
-
address?: string;
|
|
11
|
-
address_position?: string;
|
|
12
|
-
country?: string;
|
|
13
|
-
delivery_product?: string;
|
|
14
|
-
print_mode?: string;
|
|
15
|
-
print_spectrum?: string;
|
|
16
|
-
price_currency?: string;
|
|
17
|
-
price_value?: number;
|
|
18
|
-
paper_types?: string[];
|
|
19
|
-
fonts?: FontInfo[];
|
|
20
|
-
source?: string;
|
|
21
|
-
tracking_number?: string;
|
|
22
|
-
submitted_at?: string;
|
|
23
|
-
created_at?: string;
|
|
24
|
-
updated_at?: string;
|
|
25
|
-
}
|
|
26
|
-
export interface LetterRelationships {
|
|
27
|
-
organisation?: RelationshipItem;
|
|
28
|
-
events?: RelationshipMany;
|
|
29
|
-
batch?: RelationshipItem;
|
|
30
|
-
}
|
|
31
|
-
export interface LetterPriceAttributes {
|
|
32
|
-
currency?: string;
|
|
33
|
-
price?: number;
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=response.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../../src/resources/letters/response.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAEhF,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,KAAK,CAAC,EAAE,gBAAgB,CAAC;CAC1B;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/resources/letters/response.ts"],"names":[],"mappings":""}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { AddressPosition, DeliveryProduct, PrintMode, PrintSpectrum, PaperType } from '../../common/enums';
|
|
2
|
-
import { PresetRelationship } from '../../common/preset';
|
|
3
|
-
export interface LetterRecipient {
|
|
4
|
-
name: string;
|
|
5
|
-
street?: string;
|
|
6
|
-
pobox?: string;
|
|
7
|
-
number?: string;
|
|
8
|
-
zip: string;
|
|
9
|
-
city: string;
|
|
10
|
-
country: string;
|
|
11
|
-
}
|
|
12
|
-
export interface LetterSender {
|
|
13
|
-
name: string;
|
|
14
|
-
street?: string;
|
|
15
|
-
pobox?: string;
|
|
16
|
-
number?: string;
|
|
17
|
-
zip: string;
|
|
18
|
-
city: string;
|
|
19
|
-
country: string;
|
|
20
|
-
}
|
|
21
|
-
export interface LetterMetaData {
|
|
22
|
-
recipient: LetterRecipient;
|
|
23
|
-
sender: LetterSender;
|
|
24
|
-
}
|
|
25
|
-
export interface LetterCreateOptions {
|
|
26
|
-
fileUrl: string;
|
|
27
|
-
fileSignature: string;
|
|
28
|
-
fileOriginalName: string;
|
|
29
|
-
addressPosition: AddressPosition;
|
|
30
|
-
autoSend: boolean;
|
|
31
|
-
deliveryProduct?: DeliveryProduct;
|
|
32
|
-
printMode?: PrintMode;
|
|
33
|
-
printSpectrum?: PrintSpectrum;
|
|
34
|
-
metaData?: LetterMetaData;
|
|
35
|
-
preset?: PresetRelationship;
|
|
36
|
-
}
|
|
37
|
-
export interface LetterUploadOptions {
|
|
38
|
-
filePath: string;
|
|
39
|
-
fileOriginalName: string;
|
|
40
|
-
addressPosition: AddressPosition;
|
|
41
|
-
autoSend: boolean;
|
|
42
|
-
deliveryProduct?: DeliveryProduct;
|
|
43
|
-
printMode?: PrintMode;
|
|
44
|
-
printSpectrum?: PrintSpectrum;
|
|
45
|
-
metaData?: LetterMetaData;
|
|
46
|
-
preset?: PresetRelationship;
|
|
47
|
-
}
|
|
48
|
-
export interface LetterSendOptions {
|
|
49
|
-
letterId: string;
|
|
50
|
-
deliveryProduct: DeliveryProduct;
|
|
51
|
-
printMode: PrintMode;
|
|
52
|
-
printSpectrum: PrintSpectrum;
|
|
53
|
-
}
|
|
54
|
-
export interface LetterPriceOptions {
|
|
55
|
-
country: string;
|
|
56
|
-
paperTypes: PaperType[];
|
|
57
|
-
printMode: PrintMode;
|
|
58
|
-
printSpectrum: PrintSpectrum;
|
|
59
|
-
deliveryProduct: DeliveryProduct;
|
|
60
|
-
}
|
|
61
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/resources/letters/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC3G,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,eAAe,CAAC;IAC3B,MAAM,EAAE,YAAY,CAAC;CACtB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,eAAe,CAAC;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC7B;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,eAAe,CAAC;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC7B;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,eAAe,CAAC;IACjC,SAAS,EAAE,SAAS,CAAC;IACrB,aAAa,EAAE,aAAa,CAAC;CAC9B;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,SAAS,EAAE,SAAS,CAAC;IACrB,aAAa,EAAE,aAAa,CAAC;IAC7B,eAAe,EAAE,eAAe,CAAC;CAClC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/resources/letters/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { PingenResponse } from '../../common/response';
|
|
2
|
-
import { BaseResource } from '../base';
|
|
3
|
-
export declare class Organisations extends BaseResource {
|
|
4
|
-
getDetails(orgId: string, params?: Record<string, string>): Promise<PingenResponse>;
|
|
5
|
-
getCollection(params?: Record<string, string>): Promise<PingenResponse>;
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=organisations.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"organisations.d.ts","sourceRoot":"","sources":["../../../src/resources/organisations/organisations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,qBAAa,aAAc,SAAQ,YAAY;IAC7C,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC;IAInF,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC;CAGxE"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Organisations = void 0;
|
|
4
|
-
const base_1 = require("../base");
|
|
5
|
-
class Organisations extends base_1.BaseResource {
|
|
6
|
-
getDetails(orgId, params) {
|
|
7
|
-
return this.requestor.get(`/organisations/${orgId}`, params);
|
|
8
|
-
}
|
|
9
|
-
getCollection(params) {
|
|
10
|
-
return this.requestor.get('/organisations', params);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
exports.Organisations = Organisations;
|
|
14
|
-
//# sourceMappingURL=organisations.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"organisations.js","sourceRoot":"","sources":["../../../src/resources/organisations/organisations.ts"],"names":[],"mappings":";;;AACA,kCAAuC;AAEvC,MAAa,aAAc,SAAQ,mBAAY;IAC7C,UAAU,CAAC,KAAa,EAAE,MAA+B;QACvD,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,kBAAkB,KAAK,EAAE,EAAE,MAAM,CAAC,CAAC;IAC/D,CAAC;IAED,aAAa,CAAC,MAA+B;QAC3C,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;IACtD,CAAC;CACF;AARD,sCAQC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { RelationshipMany } from '../../common/relationships';
|
|
2
|
-
export interface OrganisationAttributes {
|
|
3
|
-
name?: string;
|
|
4
|
-
status?: string;
|
|
5
|
-
plan?: string;
|
|
6
|
-
billing_mode?: string;
|
|
7
|
-
billing_currency?: string;
|
|
8
|
-
billing_balance?: number;
|
|
9
|
-
missing_credits?: number;
|
|
10
|
-
edition?: string;
|
|
11
|
-
default_country?: string;
|
|
12
|
-
default_address_position?: string;
|
|
13
|
-
data_retention_addresses?: number;
|
|
14
|
-
data_retention_pdf?: number;
|
|
15
|
-
limits_monthly_letters_count?: number;
|
|
16
|
-
color?: string;
|
|
17
|
-
flags?: string[];
|
|
18
|
-
created_at?: string;
|
|
19
|
-
updated_at?: string;
|
|
20
|
-
}
|
|
21
|
-
export interface OrganisationRelationships {
|
|
22
|
-
associations?: RelationshipMany;
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=response.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../../src/resources/organisations/response.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,yBAAyB;IACxC,YAAY,CAAC,EAAE,gBAAgB,CAAC;CACjC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/resources/organisations/response.ts"],"names":[],"mappings":""}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { RelationshipItem } from '../../common/relationships';
|
|
2
|
-
export interface UserAttributes {
|
|
3
|
-
first_name?: string;
|
|
4
|
-
last_name?: string;
|
|
5
|
-
email?: string;
|
|
6
|
-
language?: string;
|
|
7
|
-
status?: string;
|
|
8
|
-
edition?: string;
|
|
9
|
-
created_at?: string;
|
|
10
|
-
updated_at?: string;
|
|
11
|
-
}
|
|
12
|
-
export interface UserAssociationAttributes {
|
|
13
|
-
role?: string;
|
|
14
|
-
created_at?: string;
|
|
15
|
-
updated_at?: string;
|
|
16
|
-
}
|
|
17
|
-
export interface UserAssociationRelationships {
|
|
18
|
-
organisation?: RelationshipItem;
|
|
19
|
-
user?: RelationshipItem;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=response.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../../src/resources/users/response.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,MAAM,WAAW,cAAc;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,4BAA4B;IAC3C,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,IAAI,CAAC,EAAE,gBAAgB,CAAC;CACzB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/resources/users/response.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { PingenResponse } from '../../common/response';
|
|
2
|
-
import { BaseResource } from '../base';
|
|
3
|
-
export declare class UserAssociations extends BaseResource {
|
|
4
|
-
getCollection(params?: Record<string, string>): Promise<PingenResponse>;
|
|
5
|
-
}
|
|
6
|
-
//# sourceMappingURL=user-associations.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"user-associations.d.ts","sourceRoot":"","sources":["../../../src/resources/users/user-associations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,qBAAa,gBAAiB,SAAQ,YAAY;IAChD,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC;CAGxE"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserAssociations = void 0;
|
|
4
|
-
const base_1 = require("../base");
|
|
5
|
-
class UserAssociations extends base_1.BaseResource {
|
|
6
|
-
getCollection(params) {
|
|
7
|
-
return this.requestor.get('/user/associations', params);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
exports.UserAssociations = UserAssociations;
|
|
11
|
-
//# sourceMappingURL=user-associations.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"user-associations.js","sourceRoot":"","sources":["../../../src/resources/users/user-associations.ts"],"names":[],"mappings":";;;AACA,kCAAuC;AAEvC,MAAa,gBAAiB,SAAQ,mBAAY;IAChD,aAAa,CAAC,MAA+B;QAC3C,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAC;IAC1D,CAAC;CACF;AAJD,4CAIC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../../src/resources/users/users.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,qBAAa,KAAM,SAAQ,YAAY;IACrC,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC;CAGrE"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Users = void 0;
|
|
4
|
-
const base_1 = require("../base");
|
|
5
|
-
class Users extends base_1.BaseResource {
|
|
6
|
-
getDetails(params) {
|
|
7
|
-
return this.requestor.get('/user', params);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
exports.Users = Users;
|
|
11
|
-
//# sourceMappingURL=users.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"users.js","sourceRoot":"","sources":["../../../src/resources/users/users.ts"],"names":[],"mappings":";;;AACA,kCAAuC;AAEvC,MAAa,KAAM,SAAQ,mBAAY;IACrC,UAAU,CAAC,MAA+B;QACxC,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC7C,CAAC;CACF;AAJD,sBAIC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../src/resources/webhooks/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,oBAAoB;IAC9B,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,aAAa,kBAAkB;IAC/B,SAAS,cAAc;IACvB,oBAAoB,0BAA0B;CAC/C"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WebhookEventCategory = void 0;
|
|
4
|
-
var WebhookEventCategory;
|
|
5
|
-
(function (WebhookEventCategory) {
|
|
6
|
-
WebhookEventCategory["Issues"] = "issues";
|
|
7
|
-
WebhookEventCategory["Sent"] = "sent";
|
|
8
|
-
WebhookEventCategory["Undeliverable"] = "undeliverable";
|
|
9
|
-
WebhookEventCategory["Delivered"] = "delivered";
|
|
10
|
-
WebhookEventCategory["ChannelSubscriptions"] = "channel_subscriptions";
|
|
11
|
-
})(WebhookEventCategory || (exports.WebhookEventCategory = WebhookEventCategory = {}));
|
|
12
|
-
//# sourceMappingURL=enums.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../../src/resources/webhooks/enums.ts"],"names":[],"mappings":";;;AAAA,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC9B,yCAAiB,CAAA;IACjB,qCAAa,CAAA;IACb,uDAA+B,CAAA;IAC/B,+CAAuB,CAAA;IACvB,sEAA8C,CAAA;AAChD,CAAC,EANW,oBAAoB,oCAApB,oBAAoB,QAM/B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../../src/resources/webhooks/response.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/resources/webhooks/response.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/resources/webhooks/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/C,MAAM,WAAW,oBAAoB;IACnC,aAAa,EAAE,oBAAoB,CAAC;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/resources/webhooks/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { PingenResponse } from '../../common/response';
|
|
2
|
-
import { OrgResource } from '../base';
|
|
3
|
-
import { WebhookCreateOptions } from './types';
|
|
4
|
-
export declare class Webhooks extends OrgResource {
|
|
5
|
-
getDetails(webhookId: string, params?: Record<string, string>): Promise<PingenResponse>;
|
|
6
|
-
getCollection(params?: Record<string, string>): Promise<PingenResponse>;
|
|
7
|
-
create(opts: WebhookCreateOptions): Promise<PingenResponse>;
|
|
8
|
-
delete(webhookId: string): Promise<PingenResponse>;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=webhooks.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../../../src/resources/webhooks/webhooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/C,qBAAa,QAAS,SAAQ,WAAW;IACvC,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC;IAIvF,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC;IAIvE,MAAM,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,cAAc,CAAC;IAU3D,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;CAGnD"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Webhooks = void 0;
|
|
4
|
-
const base_1 = require("../base");
|
|
5
|
-
const payload_1 = require("../../utils/payload");
|
|
6
|
-
class Webhooks extends base_1.OrgResource {
|
|
7
|
-
getDetails(webhookId, params) {
|
|
8
|
-
return this.requestor.get(`/organisations/${this.orgId}/webhooks/${webhookId}`, params);
|
|
9
|
-
}
|
|
10
|
-
getCollection(params) {
|
|
11
|
-
return this.requestor.get(`/organisations/${this.orgId}/webhooks`, params);
|
|
12
|
-
}
|
|
13
|
-
create(opts) {
|
|
14
|
-
return this.requestor.post(`/organisations/${this.orgId}/webhooks`, (0, payload_1.buildJsonApi)({
|
|
15
|
-
type: 'webhooks',
|
|
16
|
-
attributes: { event_category: opts.eventCategory, url: opts.url, signing_key: opts.signingKey },
|
|
17
|
-
}));
|
|
18
|
-
}
|
|
19
|
-
delete(webhookId) {
|
|
20
|
-
return this.requestor.delete(`/organisations/${this.orgId}/webhooks/${webhookId}`);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
exports.Webhooks = Webhooks;
|
|
24
|
-
//# sourceMappingURL=webhooks.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../../../src/resources/webhooks/webhooks.ts"],"names":[],"mappings":";;;AACA,kCAAsC;AACtC,iDAAmD;AAGnD,MAAa,QAAS,SAAQ,kBAAW;IACvC,UAAU,CAAC,SAAiB,EAAE,MAA+B;QAC3D,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,kBAAkB,IAAI,CAAC,KAAK,aAAa,SAAS,EAAE,EAAE,MAAM,CAAC,CAAC;IAC1F,CAAC;IAED,aAAa,CAAC,MAA+B;QAC3C,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,kBAAkB,IAAI,CAAC,KAAK,WAAW,EAAE,MAAM,CAAC,CAAC;IAC7E,CAAC;IAED,MAAM,CAAC,IAA0B;QAC/B,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CACxB,kBAAkB,IAAI,CAAC,KAAK,WAAW,EACvC,IAAA,sBAAY,EAAC;YACX,IAAI,EAAE,UAAU;YAChB,UAAU,EAAE,EAAE,cAAc,EAAE,IAAI,CAAC,aAAa,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,WAAW,EAAE,IAAI,CAAC,UAAU,EAAE;SAChG,CAAC,CACH,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,SAAiB;QACtB,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,kBAAkB,IAAI,CAAC,KAAK,aAAa,SAAS,EAAE,CAAC,CAAC;IACrF,CAAC;CACF;AAtBD,4BAsBC"}
|
package/dist/utils/headers.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"headers.d.ts","sourceRoot":"","sources":["../../src/utils/headers.ts"],"names":[],"mappings":"AAEA,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAMxE"}
|
package/dist/utils/headers.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.headersToRecord = headersToRecord;
|
|
4
|
-
// Flatten the Headers WHATWG iterable into a plain Record. Headers normalises keys to
|
|
5
|
-
// lower-case and joins multi-value entries (e.g., set-cookie) with a comma.
|
|
6
|
-
function headersToRecord(headers) {
|
|
7
|
-
const rec = {};
|
|
8
|
-
headers.forEach((v, k) => {
|
|
9
|
-
rec[k] = v;
|
|
10
|
-
});
|
|
11
|
-
return rec;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=headers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"headers.js","sourceRoot":"","sources":["../../src/utils/headers.ts"],"names":[],"mappings":";;AAEA,0CAMC;AARD,sFAAsF;AACtF,4EAA4E;AAC5E,SAAgB,eAAe,CAAC,OAAgB;IAC9C,MAAM,GAAG,GAA2B,EAAE,CAAC;IACvC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACvB,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACb,CAAC,CAAC,CAAC;IACH,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"idempotency.d.ts","sourceRoot":"","sources":["../../src/utils/idempotency.ts"],"names":[],"mappings":"AAEA,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.newIdempotencyKey = newIdempotencyKey;
|
|
4
|
-
const crypto_1 = require("crypto");
|
|
5
|
-
function newIdempotencyKey() {
|
|
6
|
-
return (0, crypto_1.randomUUID)();
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=idempotency.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"idempotency.js","sourceRoot":"","sources":["../../src/utils/idempotency.ts"],"names":[],"mappings":";;AAEA,8CAEC;AAJD,mCAAoC;AAEpC,SAAgB,iBAAiB;IAC/B,OAAO,IAAA,mBAAU,GAAE,CAAC;AACtB,CAAC"}
|
package/dist/utils/object.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../src/utils/object.ts"],"names":[],"mappings":"AAIA,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAQnF"}
|
package/dist/utils/object.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.definedOnly = definedOnly;
|
|
4
|
-
// Drop keys whose value is `undefined`. Used for building API attribute payloads from
|
|
5
|
-
// option objects without a wall of `if (opts.x != null) attrs.x_snake = opts.x;` lines.
|
|
6
|
-
// We deliberately keep `null` and falsy values (0, '', false) — only `undefined` means
|
|
7
|
-
// "the caller didn't provide this".
|
|
8
|
-
function definedOnly(input) {
|
|
9
|
-
const result = {};
|
|
10
|
-
for (const key of Object.keys(input)) {
|
|
11
|
-
if (input[key] !== undefined) {
|
|
12
|
-
result[key] = input[key];
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
return result;
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=object.js.map
|
package/dist/utils/object.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"object.js","sourceRoot":"","sources":["../../src/utils/object.ts"],"names":[],"mappings":";;AAIA,kCAQC;AAZD,sFAAsF;AACtF,wFAAwF;AACxF,uFAAuF;AACvF,oCAAoC;AACpC,SAAgB,WAAW,CAAoC,KAAQ;IACrE,MAAM,MAAM,GAAe,EAAE,CAAC;IAC9B,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAgB,EAAE,CAAC;QACpD,IAAI,KAAK,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE,CAAC;YAC7B,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/utils/payload.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../src/utils/payload.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACzC;AAKD,wBAAgB,YAAY,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,CAYzD"}
|
package/dist/utils/payload.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildJsonApi = buildJsonApi;
|
|
4
|
-
// Serialise a JSON:API document. Keeping this in one helper avoids drift between resources
|
|
5
|
-
// and ensures optional keys (id, attributes, relationships) stay omitted when absent —
|
|
6
|
-
// some Pingen endpoints reject unexpected null fields.
|
|
7
|
-
function buildJsonApi(env) {
|
|
8
|
-
const data = { type: env.type };
|
|
9
|
-
if (env.id !== undefined) {
|
|
10
|
-
data.id = env.id;
|
|
11
|
-
}
|
|
12
|
-
if (env.attributes !== undefined) {
|
|
13
|
-
data.attributes = env.attributes;
|
|
14
|
-
}
|
|
15
|
-
if (env.relationships !== undefined) {
|
|
16
|
-
data.relationships = env.relationships;
|
|
17
|
-
}
|
|
18
|
-
return JSON.stringify({ data });
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=payload.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../src/utils/payload.ts"],"names":[],"mappings":";;AAUA,oCAYC;AAfD,2FAA2F;AAC3F,uFAAuF;AACvF,uDAAuD;AACvD,SAAgB,YAAY,CAAC,GAAoB;IAC/C,MAAM,IAAI,GAA4B,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC;IACzD,IAAI,GAAG,CAAC,EAAE,KAAK,SAAS,EAAE,CAAC;QACzB,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC,EAAE,CAAC;IACnB,CAAC;IACD,IAAI,GAAG,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;QACjC,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC,UAAU,CAAC;IACnC,CAAC;IACD,IAAI,GAAG,CAAC,aAAa,KAAK,SAAS,EAAE,CAAC;QACpC,IAAI,CAAC,aAAa,GAAG,GAAG,CAAC,aAAa,CAAC;IACzC,CAAC;IACD,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;AAClC,CAAC"}
|
package/dist/utils/retry.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
2
|
-
export declare function isRetryableStatus(method: HttpMethod, status: number): boolean;
|
|
3
|
-
export declare function shouldAttachIdempotencyKey(method: HttpMethod): boolean;
|
|
4
|
-
export declare function computeBackoffMs(retryAfterHeader: string | undefined, attempt: number): number;
|
|
5
|
-
export declare function sleep(ms: number): Promise<void>;
|
|
6
|
-
//# sourceMappingURL=retry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../../src/utils/retry.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;AASrE,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAQ7E;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAEtE;AAID,wBAAgB,gBAAgB,CAAC,gBAAgB,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAG9F;AAaD,wBAAgB,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE/C"}
|
package/dist/utils/retry.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isRetryableStatus = isRetryableStatus;
|
|
4
|
-
exports.shouldAttachIdempotencyKey = shouldAttachIdempotencyKey;
|
|
5
|
-
exports.computeBackoffMs = computeBackoffMs;
|
|
6
|
-
exports.sleep = sleep;
|
|
7
|
-
const constants_1 = require("../constants");
|
|
8
|
-
const IDEMPOTENT_METHODS = new Set(['GET', 'PUT', 'DELETE']);
|
|
9
|
-
const MUTATION_METHODS = new Set(['POST', 'PATCH']);
|
|
10
|
-
// Retry policy:
|
|
11
|
-
// 429 — always safe (server rejected before processing); honours Retry-After.
|
|
12
|
-
// 5xx — safe only if method is idempotent OR we attached an Idempotency-Key (mutations).
|
|
13
|
-
// Same Idempotency-Key is reused across all attempts so the server can deduplicate.
|
|
14
|
-
function isRetryableStatus(method, status) {
|
|
15
|
-
if (status === 429) {
|
|
16
|
-
return true;
|
|
17
|
-
}
|
|
18
|
-
if (status >= 500 && status < 600) {
|
|
19
|
-
return IDEMPOTENT_METHODS.has(method) || MUTATION_METHODS.has(method);
|
|
20
|
-
}
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
function shouldAttachIdempotencyKey(method) {
|
|
24
|
-
return MUTATION_METHODS.has(method);
|
|
25
|
-
}
|
|
26
|
-
// Picks the larger of server-suggested Retry-After and exponential backoff, with jitter.
|
|
27
|
-
// attempt starts at 0 (first retry).
|
|
28
|
-
function computeBackoffMs(retryAfterHeader, attempt) {
|
|
29
|
-
const base = Math.max(parseRetryAfterMs(retryAfterHeader), constants_1.BASE_BACKOFF_MS * 2 ** attempt);
|
|
30
|
-
return Math.round(base * (0.8 + Math.random() * 0.4));
|
|
31
|
-
}
|
|
32
|
-
function parseRetryAfterMs(v) {
|
|
33
|
-
if (typeof v !== 'string') {
|
|
34
|
-
return 0;
|
|
35
|
-
}
|
|
36
|
-
const seconds = parseInt(v, 10);
|
|
37
|
-
if (!Number.isFinite(seconds) || seconds <= 0) {
|
|
38
|
-
return 0;
|
|
39
|
-
}
|
|
40
|
-
return Math.min(seconds * 1000, constants_1.MAX_RETRY_AFTER_MS);
|
|
41
|
-
}
|
|
42
|
-
function sleep(ms) {
|
|
43
|
-
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=retry.js.map
|
package/dist/utils/retry.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"retry.js","sourceRoot":"","sources":["../../src/utils/retry.ts"],"names":[],"mappings":";;AAWA,8CAQC;AAED,gEAEC;AAID,4CAGC;AAaD,sBAEC;AA7CD,4CAAmE;AAInE,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAa,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;AACzE,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAEhE,gBAAgB;AAChB,gFAAgF;AAChF,2FAA2F;AAC3F,sFAAsF;AACtF,SAAgB,iBAAiB,CAAC,MAAkB,EAAE,MAAc;IAClE,IAAI,MAAM,KAAK,GAAG,EAAE,CAAC;QACnB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,MAAM,IAAI,GAAG,IAAI,MAAM,GAAG,GAAG,EAAE,CAAC;QAClC,OAAO,kBAAkB,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,gBAAgB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACxE,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAgB,0BAA0B,CAAC,MAAkB;IAC3D,OAAO,gBAAgB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACtC,CAAC;AAED,yFAAyF;AACzF,qCAAqC;AACrC,SAAgB,gBAAgB,CAAC,gBAAoC,EAAE,OAAe;IACpF,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,EAAE,2BAAe,GAAG,CAAC,IAAI,OAAO,CAAC,CAAC;IAC3F,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC,CAAC;AACxD,CAAC;AAED,SAAS,iBAAiB,CAAC,CAAqB;IAC9C,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE,CAAC;QAC1B,OAAO,CAAC,CAAC;IACX,CAAC;IACD,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAChC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,OAAO,IAAI,CAAC,EAAE,CAAC;QAC9C,OAAO,CAAC,CAAC;IACX,CAAC;IACD,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,EAAE,8BAAkB,CAAC,CAAC;AACtD,CAAC;AAED,SAAgB,KAAK,CAAC,EAAU;IAC9B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAC3D,CAAC"}
|
package/dist/webhook.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export interface WebhookEvent {
|
|
2
|
-
body: string;
|
|
3
|
-
data: unknown;
|
|
4
|
-
}
|
|
5
|
-
export declare function verifyWebhookSignature(payload: string, signature: string, secret: string): void;
|
|
6
|
-
export declare function constructWebhookEvent(payload: string, signature: string, secret: string): WebhookEvent;
|
|
7
|
-
//# sourceMappingURL=webhook.d.ts.map
|
package/dist/webhook.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["../src/webhook.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,CAAC;CACf;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAa/F;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,YAAY,CAGtG"}
|